Rocky_Mountain_Vending/.pnpm-store/v10/files/fa/231b59a3ce8b6ee3bec5e480682fce5b4c4e40515c81ef751930ebd845b0cb84a179f45d4ede3e30f493e63b65cd5801f7de6e50c391beca7d72426d5b33d7
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

27 lines
No EOL
1,012 B
Text

import { Subject } from '../Subject';
import { Observable } from '../Observable';
import { defer } from './defer';
var DEFAULT_CONFIG = {
connector: function () { return new Subject(); },
resetOnDisconnect: true,
};
export function connectable(source, config) {
if (config === void 0) { config = DEFAULT_CONFIG; }
var connection = null;
var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a;
var subject = connector();
var result = new Observable(function (subscriber) {
return subject.subscribe(subscriber);
});
result.connect = function () {
if (!connection || connection.closed) {
connection = defer(function () { return source; }).subscribe(subject);
if (resetOnDisconnect) {
connection.add(function () { return (subject = connector()); });
}
}
return connection;
};
return result;
}
//# sourceMappingURL=connectable.js.map