webdetector/.cache/8b/4e6dc12b59d04c8257a313f82fd3a9.json
2018-12-21 13:36:28 +01:00

1 line
18 KiB
JSON

{"id":"../node_modules/rxjs/_esm5/internal/operators/first.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/first.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/operators/first.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/EmptyError","loc":{"line":2,"column":27},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/first.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/EmptyError.js"},{"name":"./filter","loc":{"line":3,"column":23},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/first.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/filter.js"},{"name":"./take","loc":{"line":4,"column":21},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/first.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/take.js"},{"name":"./defaultIfEmpty","loc":{"line":5,"column":31},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/first.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js"},{"name":"./throwIfEmpty","loc":{"line":6,"column":29},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/first.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js"},{"name":"../util/identity","loc":{"line":7,"column":25},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/first.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/identity.js"}],"generated":{"js":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.first = first;\n\nvar _EmptyError = require(\"../util/EmptyError\");\n\nvar _filter = require(\"./filter\");\n\nvar _take = require(\"./take\");\n\nvar _defaultIfEmpty = require(\"./defaultIfEmpty\");\n\nvar _throwIfEmpty = require(\"./throwIfEmpty\");\n\nvar _identity = require(\"../util/identity\");\n\n/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */\nfunction first(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe(predicate ? (0, _filter.filter)(function (v, i) {\n return predicate(v, i, source);\n }) : _identity.identity, (0, _take.take)(1), hasDefaultValue ? (0, _defaultIfEmpty.defaultIfEmpty)(defaultValue) : (0, _throwIfEmpty.throwIfEmpty)(function () {\n return new _EmptyError.EmptyError();\n }));\n };\n}","map":{"mappings":[{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":6,"column":0},"generated":{"line":8,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":7,"column":0},"generated":{"line":10,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":8,"column":0},"generated":{"line":12,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":9,"column":0},"generated":{"line":14,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":10,"column":0},"generated":{"line":16,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":75,"column":0},"generated":{"line":18,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":4,"column":0},"generated":{"line":20,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":79,"column":2},"generated":{"line":21,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":79,"column":8},"generated":{"line":21,"column":9}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":79,"column":2},"generated":{"line":21,"column":14}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":79,"column":8},"generated":{"line":21,"column":15}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":79,"column":2},"generated":{"line":21,"column":24}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":79,"column":26},"generated":{"line":21,"column":26}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":79,"column":2},"generated":{"line":21,"column":38}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":79,"column":47},"generated":{"line":21,"column":40}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":80,"column":2},"generated":{"line":22,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":80,"column":2},"generated":{"line":22,"column":6}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":80,"column":10},"generated":{"line":22,"column":21}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":80,"column":10},"generated":{"line":22,"column":24}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":80,"column":36},"generated":{"line":22,"column":33}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":80,"column":36},"generated":{"line":22,"column":34}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":80,"column":10},"generated":{"line":22,"column":40}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":80,"column":43},"generated":{"line":22,"column":44}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":80,"column":2},"generated":{"line":22,"column":45}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":23,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":23,"column":9}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":23,"column":19}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":23,"column":25}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":23,"column":27}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":11}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":17}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":18}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":22}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":23}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":32}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":35}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":55}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":65}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":66}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":68}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":69}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":24,"column":71}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":25,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":25,"column":13}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":25,"column":22}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":25,"column":23}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":25,"column":24}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":25,"column":26}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":25,"column":27}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":25,"column":29}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":25,"column":35}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":25,"column":36}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":5}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":6}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":9}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":27}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":29}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":45}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":46}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":47}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":49}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":64}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":67}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":103}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":115}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":116}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":119}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":151}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":26,"column":163}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":27,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":27,"column":13}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":27,"column":17}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":27,"column":39}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":27,"column":41}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":28,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":28,"column":5}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":28,"column":6}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":28,"column":7}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":29,"column":0}},{"source":"../../../src/internal/operators/first.ts","name":null,"original":{"line":85,"column":1},"generated":{"line":29,"column":3}}],"sources":{"../../../src/internal/operators/first.ts":"import { Observable } from '../Observable';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { EmptyError } from '../util/EmptyError';\nimport { OperatorFunction } from '../../internal/types';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\n\n/* tslint:disable:max-line-length */\nexport function first<T, D = T>(\n predicate?: null,\n defaultValue?: D\n): OperatorFunction<T, T | D>;\nexport function first<T, S extends T>(\n predicate: (value: T, index: number, source: Observable<T>) => value is S,\n defaultValue?: S\n): OperatorFunction<T, S>;\nexport function first<T, D = T>(\n predicate: (value: T, index: number, source: Observable<T>) => boolean,\n defaultValue?: D\n): OperatorFunction<T, T | D>;\n/* tslint:enable:max-line-length */\n\n/**\n * Emits only the first value (or the first value that meets some condition)\n * emitted by the source Observable.\n *\n * <span class=\"informal\">Emits only the first value. Or emits only the first\n * value that passes some test.</span>\n *\n * ![](first.png)\n *\n * If called with no arguments, `first` emits the first value of the source\n * Observable, then completes. If called with a `predicate` function, `first`\n * emits the first value of the source that matches the specified condition. It\n * may also take a deprecated `resultSelector` function to produce the output\n * value from the input value, and a `defaultValue` to emit in case the source\n * completes before it is able to emit a valid value. Throws an error if\n * `defaultValue` was not provided and a matching element is not found.\n *\n * ## Examples\n * Emit only the first click that happens on the DOM\n * ```javascript\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(first());\n * result.subscribe(x => console.log(x));\n * ```\n *\n * Emits the first click that happens on a DIV\n * ```javascript\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(first(ev => ev.target.tagName === 'DIV'));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link filter}\n * @see {@link find}\n * @see {@link take}\n *\n * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`\n * callback if the Observable completes before any `next` notification was sent.\n *\n * @param {function(value: T, index: number, source: Observable<T>): boolean} [predicate]\n * An optional function called with each item to test for condition matching.\n * @param {R} [defaultValue] The default value emitted in case no valid value\n * was found on the source.\n * @return {Observable<T|R>} An Observable of the first item that matches the\n * condition.\n * @method first\n * @owner Observable\n */\nexport function first<T, D>(\n predicate?: ((value: T, index: number, source: Observable<T>) => boolean) | null,\n defaultValue?: D\n): OperatorFunction<T, T | D> {\n const hasDefaultValue = arguments.length >= 2;\n return (source: Observable<T>) => source.pipe(\n predicate ? filter((v, i) => predicate(v, i, source)) : identity,\n take(1),\n hasDefaultValue ? defaultIfEmpty<T | D>(defaultValue) : throwIfEmpty(() => new EmptyError()),\n );\n}\n"},"lineCount":null}},"hash":"3268fa88f907be59ce505a303ad9d5f8","cacheData":{"env":{}}}