webdetector/.cache/a4/f66b840f696cdf812c8c75e9c3aee1.json
2018-12-21 13:36:28 +01:00

1 line
15 KiB
JSON

{"id":"../node_modules/rxjs/_esm5/internal/operators/elementAt.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/elementAt.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/operators/elementAt.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":"../util/ArgumentOutOfRangeError","loc":{"line":2,"column":40},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/elementAt.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js"},{"name":"./filter","loc":{"line":3,"column":23},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/elementAt.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/filter.js"},{"name":"./throwIfEmpty","loc":{"line":4,"column":29},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/elementAt.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js"},{"name":"./defaultIfEmpty","loc":{"line":5,"column":31},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/elementAt.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js"},{"name":"./take","loc":{"line":6,"column":21},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/elementAt.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/take.js"}],"generated":{"js":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.elementAt = elementAt;\n\nvar _ArgumentOutOfRangeError = require(\"../util/ArgumentOutOfRangeError\");\n\nvar _filter = require(\"./filter\");\n\nvar _throwIfEmpty = require(\"./throwIfEmpty\");\n\nvar _defaultIfEmpty = require(\"./defaultIfEmpty\");\n\nvar _take = require(\"./take\");\n\n/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */\nfunction elementAt(index, defaultValue) {\n if (index < 0) {\n throw new _ArgumentOutOfRangeError.ArgumentOutOfRangeError();\n }\n\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe((0, _filter.filter)(function (v, i) {\n return i === index;\n }), (0, _take.take)(1), hasDefaultValue ? (0, _defaultIfEmpty.defaultIfEmpty)(defaultValue) : (0, _throwIfEmpty.throwIfEmpty)(function () {\n return new _ArgumentOutOfRangeError.ArgumentOutOfRangeError();\n }));\n };\n}","map":{"mappings":[{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":6,"column":0},"generated":{"line":8,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":7,"column":0},"generated":{"line":10,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":8,"column":0},"generated":{"line":12,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":9,"column":0},"generated":{"line":14,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":56,"column":0},"generated":{"line":16,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":3,"column":0},"generated":{"line":18,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":2},"generated":{"line":19,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":14},"generated":{"line":19,"column":9}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":2},"generated":{"line":19,"column":18}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":17},"generated":{"line":19,"column":19}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":2},"generated":{"line":19,"column":24}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":17},"generated":{"line":19,"column":26}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":2},"generated":{"line":19,"column":38}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":17},"generated":{"line":19,"column":40}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":19},"generated":{"line":20,"column":6}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":19},"generated":{"line":20,"column":11}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":25},"generated":{"line":20,"column":14}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":29},"generated":{"line":20,"column":17}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":57},"generated":{"line":21,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":57},"generated":{"line":21,"column":10}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":57},"generated":{"line":21,"column":14}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":57},"generated":{"line":21,"column":62}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":57,"column":57},"generated":{"line":21,"column":64}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":58,"column":2},"generated":{"line":22,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":59,"column":2},"generated":{"line":24,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":59,"column":2},"generated":{"line":24,"column":6}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":59,"column":10},"generated":{"line":24,"column":21}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":59,"column":10},"generated":{"line":24,"column":24}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":59,"column":36},"generated":{"line":24,"column":33}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":59,"column":36},"generated":{"line":24,"column":34}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":59,"column":10},"generated":{"line":24,"column":40}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":59,"column":43},"generated":{"line":24,"column":44}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":59,"column":2},"generated":{"line":24,"column":45}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":63,"column":8},"generated":{"line":25,"column":9}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":63,"column":8},"generated":{"line":25,"column":19}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":63,"column":8},"generated":{"line":25,"column":25}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":63,"column":23},"generated":{"line":25,"column":27}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":6},"generated":{"line":26,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":8},"generated":{"line":26,"column":11}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":8},"generated":{"line":26,"column":17}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":20},"generated":{"line":26,"column":18}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":8},"generated":{"line":26,"column":22}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":21},"generated":{"line":26,"column":23}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":21},"generated":{"line":26,"column":43}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":27},"generated":{"line":26,"column":53}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":21},"generated":{"line":26,"column":54}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":27},"generated":{"line":26,"column":56}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":21},"generated":{"line":26,"column":57}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":31},"generated":{"line":26,"column":59}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":31},"generated":{"line":27,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":31},"generated":{"line":27,"column":13}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":31},"generated":{"line":27,"column":14}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":31},"generated":{"line":27,"column":19}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":31},"generated":{"line":27,"column":24}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":56},"generated":{"line":28,"column":0}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":21},"generated":{"line":28,"column":5}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":8},"generated":{"line":28,"column":6}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":56},"generated":{"line":28,"column":8}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":65,"column":3},"generated":{"line":28,"column":24}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":56},"generated":{"line":28,"column":25}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":8},"generated":{"line":28,"column":26}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":65,"column":4},"generated":{"line":28,"column":28}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":65,"column":4},"generated":{"line":28,"column":43}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":66,"column":1},"generated":{"line":28,"column":46}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":66,"column":1},"generated":{"line":28,"column":82}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":66,"column":1},"generated":{"line":28,"column":94}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":65,"column":4},"generated":{"line":28,"column":95}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":8},"generated":{"line":30,"column":6}},{"source":"../../../src/internal/operators/elementAt.ts","name":null,"original":{"line":64,"column":6},"generated":{"line":30,"column":7}}],"sources":{"../../../src/internal/operators/elementAt.ts":"import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\nimport { filter } from './filter';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { take } from './take';\n\n/**\n * Emits the single value at the specified `index` in a sequence of emissions\n * from the source Observable.\n *\n * <span class=\"informal\">Emits only the i-th value, then completes.</span>\n *\n * ![](elementAt.png)\n *\n * `elementAt` returns an Observable that emits the item at the specified\n * `index` in the source Observable, or a default value if that `index` is out\n * of range and the `default` argument is provided. If the `default` argument is\n * not given and the `index` is out of range, the output Observable will emit an\n * `ArgumentOutOfRangeError` error.\n *\n * ## Example\n * Emit only the third click event\n * ```javascript\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(elementAt(2));\n * result.subscribe(x => console.log(x));\n *\n * // Results in:\n * // click 1 = nothing\n * // click 2 = nothing\n * // click 3 = MouseEvent object logged to console\n * ```\n *\n * @see {@link first}\n * @see {@link last}\n * @see {@link skip}\n * @see {@link single}\n * @see {@link take}\n *\n * @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an\n * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0` or the\n * Observable has completed before emitting the i-th `next` notification.\n *\n * @param {number} index Is the number `i` for the i-th source emission that has\n * happened since the subscription, starting from the number `0`.\n * @param {T} [defaultValue] The default value returned for missing indices.\n * @return {Observable} An Observable that emits a single item, if it is found.\n * Otherwise, will emit the default value if given. If not, then emits an error.\n * @method elementAt\n * @owner Observable\n */\nexport function elementAt<T>(index: number, defaultValue?: T): MonoTypeOperatorFunction<T> {\n if (index < 0) { throw new ArgumentOutOfRangeError(); }\n const hasDefaultValue = arguments.length >= 2;\n return (source: Observable<T>) => source.pipe(\n filter((v, i) => i === index),\n take(1),\n hasDefaultValue\n ? defaultIfEmpty(defaultValue)\n : throwIfEmpty(() => new ArgumentOutOfRangeError()),\n );\n}\n"},"lineCount":null}},"hash":"942f16db7ad098b9c73d73a8f0d9aa42","cacheData":{"env":{}}}