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>
13 lines
No EOL
527 B
Text
13 lines
No EOL
527 B
Text
import { operate } from '../util/lift';
|
|
import { createOperatorSubscriber } from './OperatorSubscriber';
|
|
export function takeWhile(predicate, inclusive = false) {
|
|
return operate((source, subscriber) => {
|
|
let index = 0;
|
|
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
|
|
const result = predicate(value, index++);
|
|
(result || inclusive) && subscriber.next(value);
|
|
!result && subscriber.complete();
|
|
}));
|
|
});
|
|
}
|
|
//# sourceMappingURL=takeWhile.js.map |