Created
August 19, 2020 02:48
-
-
Save joshuarule/9b5ff630a221c2d1b72c2fb1f5cdffc2 to your computer and use it in GitHub Desktop.
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
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