This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const redux = reuire('redux'); | |
const createStore = redux.createStore; | |
const = initialState = { | |
counter: 0 | |
}; | |
// Reducer | |
const rootReducer = (state = initialState, action) => { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var path = require('path'); | |
const BASEURL = process.env.BASEURL || ''; | |
const ACCESSTOKEN = process.env.ACCESSTOKEN || ''; | |
const HEADERS = { | |
'User-Agent': 'Super Agent/0.0.1', | |
'Authorization': 'Bearer ' + ACCESSTOKEN, | |
'Content-Type': 'application/json', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = randSplit; | |
function randSplit(_ary, _percentageSplit) { | |
// make sure the params are arrays | |
if(!Array.isArray(_ary) || !Array.isArray(_percentageSplit)) { | |
console.log(`Both arguments must be of array type`); | |
return false; | |
} |