Rocky_Mountain_Vending/.pnpm-store/v10/files/63/09ab49e63fa4d82fb369b8c6596b2f69b8f844d4f9001d0994f8baee9f35127dbb8b4b5e5ddf0cb77348af10d4397c82860672055d7248f79edfb2a2eb5406
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

38 lines
No EOL
1.2 KiB
Text

import { identity } from '../util/identity';
import { isScheduler } from '../util/isScheduler';
import { defer } from './defer';
import { scheduleIterable } from '../scheduled/scheduleIterable';
export function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) {
let resultSelector;
let initialState;
if (arguments.length === 1) {
({
initialState,
condition,
iterate,
resultSelector = identity,
scheduler,
} = initialStateOrOptions);
}
else {
initialState = initialStateOrOptions;
if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) {
resultSelector = identity;
scheduler = resultSelectorOrScheduler;
}
else {
resultSelector = resultSelectorOrScheduler;
}
}
function* gen() {
for (let state = initialState; !condition || condition(state); state = iterate(state)) {
yield resultSelector(state);
}
}
return defer((scheduler
?
() => scheduleIterable(gen(), scheduler)
:
gen));
}
//# sourceMappingURL=generate.js.map