Rocky_Mountain_Vending/.pnpm-store/v10/files/7b/05ff5b9f6493f2addf199d99d630da35df4684dd94242765e8113aeec6aa2226c97b6318241581c15053c4f42309519a2ba3d46609f4861966d02aab8c57d8
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

31 lines
902 B
Text

import { SchedulerLike } from '../types';
import { Observable } from '../Observable';
import { executeSchedule } from '../util/executeSchedule';
export function scheduleAsyncIterable<T>(input: AsyncIterable<T>, scheduler: SchedulerLike) {
if (!input) {
throw new Error('Iterable cannot be null');
}
return new Observable<T>((subscriber) => {
executeSchedule(subscriber, scheduler, () => {
const iterator = input[Symbol.asyncIterator]();
executeSchedule(
subscriber,
scheduler,
() => {
iterator.next().then((result) => {
if (result.done) {
// This will remove the subscriptions from
// the parent subscription.
subscriber.complete();
} else {
subscriber.next(result.value);
}
});
},
0,
true
);
});
});
}