Skip to content

Instantly share code, notes, and snippets.

@joshuarule
Created August 19, 2020 02:48
Show Gist options
  • Save joshuarule/9b5ff630a221c2d1b72c2fb1f5cdffc2 to your computer and use it in GitHub Desktop.
Save joshuarule/9b5ff630a221c2d1b72c2fb1f5cdffc2 to your computer and use it in GitHub Desktop.
async getSkus(starting_after, result = []) {
const skus = await stripe.skus.list({starting_after: starting_after});
result.push(skus)
if(skus.length === 100) {
return getSkus(skus[skus.length], result);
}
return result
}
let skus = getSkus();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment