Rocky_Mountain_Vending/.pnpm-store/v10/files/ee/4d78b1b8ae9b167b995966a9d73ec60727a226caf4314a3f048c0116023f2467ac549293af87db6ad78a2e2febcab7dc95c838b7002baada5be956aea5bdb3
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

22 lines
No EOL
807 B
Text

import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function find(predicate, thisArg) {
return operate(createFind(predicate, thisArg, 'value'));
}
export function createFind(predicate, thisArg, emit) {
const findIndex = emit === 'index';
return (source, subscriber) => {
let index = 0;
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
const i = index++;
if (predicate.call(thisArg, value, i, source)) {
subscriber.next(findIndex ? i : value);
subscriber.complete();
}
}, () => {
subscriber.next(findIndex ? -1 : undefined);
subscriber.complete();
}));
};
}
//# sourceMappingURL=find.js.map