Skip to content

Instantly share code, notes, and snippets.

@entipe
entipe / list-all-stripe-product.function.ts
Created June 2, 2022 21:30
List all Stripe products with RxJS/Typescript
const reachEnd = new ReplaySubject<boolean>(1);
let startingAfter: string = undefined;
return
// loop interval
interval(parseInt(process.env.STRIPE_API_DELAY))
.pipe(
// stop loop when api list reaches en
takeUntil(reachEnd),