webdetector/.cache/49/62f062346939941b3c781a4bf70e7f.json
2018-12-21 13:36:28 +01:00

1 line
13 KiB
JSON

{"id":"../node_modules/rxjs/_esm5/internal/observable/defer.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/defer.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/observable/defer.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395695572},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/package.json","includedInParent":true,"mtime":1545395355370},{"name":"../Observable","loc":{"line":2,"column":27},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/defer.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Observable.js"},{"name":"./from","loc":{"line":3,"column":21},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/defer.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/from.js"},{"name":"./empty","loc":{"line":4,"column":22},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/defer.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/empty.js"}],"generated":{"js":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defer = defer;\n\nvar _Observable = require(\"../Observable\");\n\nvar _from = require(\"./from\");\n\nvar _empty = require(\"./empty\");\n\n/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */\nfunction defer(observableFactory) {\n return new _Observable.Observable(function (subscriber) {\n var input;\n\n try {\n input = observableFactory();\n } catch (err) {\n subscriber.error(err);\n return undefined;\n }\n\n var source = input ? (0, _from.from)(input) : (0, _empty.empty)();\n return source.subscribe(subscriber);\n });\n}","map":{"mappings":[{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":3,"column":0},"generated":{"line":8,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":4,"column":0},"generated":{"line":10,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":53,"column":0},"generated":{"line":12,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":1,"column":0},"generated":{"line":14,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":54,"column":2},"generated":{"line":15,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":54,"column":13},"generated":{"line":15,"column":9}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":54,"column":2},"generated":{"line":15,"column":14}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":54,"column":13},"generated":{"line":15,"column":15}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":54,"column":2},"generated":{"line":15,"column":32}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":54,"column":24},"generated":{"line":15,"column":34}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":55,"column":4},"generated":{"line":16,"column":9}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":55,"column":8},"generated":{"line":16,"column":13}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":55,"column":4},"generated":{"line":16,"column":35}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":55,"column":47},"generated":{"line":16,"column":36}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":55,"column":47},"generated":{"line":16,"column":46}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":55,"column":47},"generated":{"line":16,"column":56}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":55,"column":47},"generated":{"line":16,"column":58}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":56,"column":4},"generated":{"line":17,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":56,"column":8},"generated":{"line":17,"column":8}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":56,"column":4},"generated":{"line":17,"column":13}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":57,"column":6},"generated":{"line":19,"column":8}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":58,"column":5},"generated":{"line":20,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":58,"column":5},"generated":{"line":20,"column":6}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":58,"column":5},"generated":{"line":20,"column":11}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":58,"column":5},"generated":{"line":20,"column":14}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":58,"column":5},"generated":{"line":20,"column":31}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":58,"column":5},"generated":{"line":20,"column":33}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":58,"column":6},"generated":{"line":21,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":59,"column":6},"generated":{"line":21,"column":13}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":59,"column":6},"generated":{"line":21,"column":18}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":60,"column":6},"generated":{"line":22,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":60,"column":6},"generated":{"line":22,"column":6}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":60,"column":13},"generated":{"line":22,"column":16}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":60,"column":13},"generated":{"line":22,"column":17}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":60,"column":6},"generated":{"line":22,"column":22}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":60,"column":23},"generated":{"line":22,"column":23}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":60,"column":6},"generated":{"line":22,"column":26}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":61,"column":5},"generated":{"line":23,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":61,"column":5},"generated":{"line":23,"column":13}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":61,"column":5},"generated":{"line":23,"column":22}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":62,"column":4},"generated":{"line":24,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":63,"column":4},"generated":{"line":26,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":63,"column":4},"generated":{"line":26,"column":8}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":63,"column":11},"generated":{"line":26,"column":14}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":63,"column":17},"generated":{"line":26,"column":17}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":63,"column":18},"generated":{"line":26,"column":22}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":63,"column":18},"generated":{"line":26,"column":25}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":63,"column":28},"generated":{"line":26,"column":41}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":63,"column":18},"generated":{"line":26,"column":46}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":63,"column":18},"generated":{"line":26,"column":47}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":63,"column":39},"generated":{"line":26,"column":50}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":63,"column":4},"generated":{"line":26,"column":69}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":64,"column":5},"generated":{"line":27,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":64,"column":5},"generated":{"line":27,"column":11}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":64,"column":5},"generated":{"line":27,"column":17}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":64,"column":5},"generated":{"line":27,"column":18}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":64,"column":5},"generated":{"line":27,"column":27}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":64,"column":5},"generated":{"line":27,"column":28}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":64,"column":5},"generated":{"line":27,"column":38}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":64,"column":5},"generated":{"line":27,"column":39}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":65,"column":1},"generated":{"line":28,"column":0}},{"source":"../../../src/internal/observable/defer.ts","name":null,"original":{"line":55,"column":4},"generated":{"line":28,"column":3}}],"sources":{"../../../src/internal/observable/defer.ts":"import { Observable } from '../Observable';\nimport { SubscribableOrPromise } from '../types';\nimport { from } from './from'; // lol\nimport { empty } from './empty';\n\n/**\n * Creates an Observable that, on subscribe, calls an Observable factory to\n * make an Observable for each new Observer.\n *\n * <span class=\"informal\">Creates the Observable lazily, that is, only when it\n * is subscribed.\n * </span>\n *\n * ![](defer.png)\n *\n * `defer` allows you to create the Observable only when the Observer\n * subscribes, and create a fresh Observable for each Observer. It waits until\n * an Observer subscribes to it, and then it generates an Observable,\n * typically with an Observable factory function. It does this afresh for each\n * subscriber, so although each subscriber may think it is subscribing to the\n * same Observable, in fact each subscriber gets its own individual\n * Observable.\n *\n * ## Example\n * ### Subscribe to either an Observable of clicks or an Observable of interval, at random\n * ```javascript\n * const clicksOrInterval = defer(function () {\n * return Math.random() > 0.5\n * ? fromEvent(document, 'click')\n * : interval(1000);\n * });\n * clicksOrInterval.subscribe(x => console.log(x));\n *\n * // Results in the following behavior:\n * // If the result of Math.random() is greater than 0.5 it will listen\n * // for clicks anywhere on the \"document\"; when document is clicked it\n * // will log a MouseEvent object to the console. If the result is less\n * // than 0.5 it will emit ascending numbers, one every second(1000ms).\n * ```\n *\n * @see {@link Observable}\n *\n * @param {function(): SubscribableOrPromise} observableFactory The Observable\n * factory function to invoke for each Observer that subscribes to the output\n * Observable. May also return a Promise, which will be converted on the fly\n * to an Observable.\n * @return {Observable} An Observable whose Observers' subscriptions trigger\n * an invocation of the given Observable factory function.\n * @static true\n * @name defer\n * @owner Observable\n */\nexport function defer<T>(observableFactory: () => SubscribableOrPromise<T> | void): Observable<T> {\n return new Observable(subscriber => {\n let input: SubscribableOrPromise<T> | void;\n try {\n input = observableFactory();\n } catch (err) {\n subscriber.error(err);\n return undefined;\n }\n const source = input ? from(input) : empty();\n return source.subscribe(subscriber);\n });\n}"},"lineCount":null}},"hash":"59d4fe2565d2c6c982eafa978aca6415","cacheData":{"env":{}}}