This file contains hidden or 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
function deep(value) { | |
if (_.isPlainObject(value)) { | |
const obj = {} | |
for (let k in value) { | |
obj[_.camelCase(k)] = deep(value[k]) | |
} | |
return obj | |
} | |
if (_.isArray(value)) { | |
return value.map(deep) |
This file contains hidden or 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 needle = require('needle'); | |
JSONStream = require('JSONStream'), | |
limit = 2000, | |
perPage = 10, | |
parser = JSONStream.parse() | |
let size = 0; | |
module.exports = function pagination(token) { | |
const options = { | |
headers: { |