Rocky_Mountain_Vending/.pnpm-store/v10/files/ac/532f78245b67d9384fceb1a09e1866e95ab05d480698f1d1514a9cd5ad8a25a598515858e714155fc2343df226df44978175d0ecbab716b51f867344639c0b
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

23 lines
No EOL
1.1 KiB
Text

import { operate } from '../util/lift';
import { noop } from '../util/noop';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
export function bufferWhen(closingSelector) {
return operate((source, subscriber) => {
let buffer = null;
let closingSubscriber = null;
const openBuffer = () => {
closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();
const b = buffer;
buffer = [];
b && subscriber.next(b);
innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop)));
};
openBuffer();
source.subscribe(createOperatorSubscriber(subscriber, (value) => buffer === null || buffer === void 0 ? void 0 : buffer.push(value), () => {
buffer && subscriber.next(buffer);
subscriber.complete();
}, undefined, () => (buffer = closingSubscriber = null)));
});
}
//# sourceMappingURL=bufferWhen.js.map