feat: initial commit

This commit is contained in:
Carlos
2024-08-12 22:57:35 -04:00
commit 6f68ae8259
13140 changed files with 1104801 additions and 0 deletions

View File

@ -0,0 +1,18 @@
import { Observable } from '../Observable';
import { from } from './from';
import { empty } from './empty';
export function defer(observableFactory) {
return new Observable(subscriber => {
let input;
try {
input = observableFactory();
}
catch (err) {
subscriber.error(err);
return undefined;
}
const source = input ? from(input) : empty();
return source.subscribe(subscriber);
});
}
//# sourceMappingURL=defer.js.map