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

1 line
17 KiB
JSON

{"id":"../node_modules/rxjs/_esm5/internal/operators/last.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/last.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/operators/last.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/last.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/last.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/filter.js"},{"name":"./takeLast","loc":{"line":4,"column":25},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/last.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/takeLast.js"},{"name":"./throwIfEmpty","loc":{"line":5,"column":29},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/last.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js"},{"name":"./defaultIfEmpty","loc":{"line":6,"column":31},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/last.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js"},{"name":"../util/identity","loc":{"line":7,"column":25},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/last.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.last = last;\n\nvar _EmptyError = require(\"../util/EmptyError\");\n\nvar _filter = require(\"./filter\");\n\nvar _takeLast = require(\"./takeLast\");\n\nvar _throwIfEmpty = require(\"./throwIfEmpty\");\n\nvar _defaultIfEmpty = require(\"./defaultIfEmpty\");\n\nvar _identity = require(\"../util/identity\");\n\n/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */\nfunction last(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, _takeLast.takeLast)(1), hasDefaultValue ? (0, _defaultIfEmpty.defaultIfEmpty)(defaultValue) : (0, _throwIfEmpty.throwIfEmpty)(function () {\n return new _EmptyError.EmptyError();\n }));\n };\n}","map":{"mappings":[{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":6,"column":0},"generated":{"line":8,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":7,"column":0},"generated":{"line":10,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":8,"column":0},"generated":{"line":12,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":9,"column":0},"generated":{"line":14,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":10,"column":0},"generated":{"line":16,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":44,"column":0},"generated":{"line":18,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":4,"column":0},"generated":{"line":20,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":48,"column":2},"generated":{"line":21,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":48,"column":8},"generated":{"line":21,"column":9}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":48,"column":2},"generated":{"line":21,"column":13}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":48,"column":8},"generated":{"line":21,"column":14}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":48,"column":2},"generated":{"line":21,"column":23}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":48,"column":26},"generated":{"line":21,"column":25}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":48,"column":2},"generated":{"line":21,"column":37}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":48,"column":46},"generated":{"line":21,"column":39}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":49,"column":2},"generated":{"line":22,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":49,"column":2},"generated":{"line":22,"column":6}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":49,"column":10},"generated":{"line":22,"column":21}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":49,"column":10},"generated":{"line":22,"column":24}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":49,"column":36},"generated":{"line":22,"column":33}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":49,"column":36},"generated":{"line":22,"column":34}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":49,"column":10},"generated":{"line":22,"column":40}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":49,"column":43},"generated":{"line":22,"column":44}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":49,"column":2},"generated":{"line":22,"column":45}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":23,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":23,"column":9}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":23,"column":19}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":23,"column":25}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":23,"column":27}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":11}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":17}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":18}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":22}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":23}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":32}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":35}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":55}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":65}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":66}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":68}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":69}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":24,"column":71}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":25,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":25,"column":13}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":25,"column":22}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":25,"column":23}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":25,"column":24}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":25,"column":26}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":25,"column":27}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":25,"column":29}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":25,"column":35}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":25,"column":36}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":5}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":6}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":9}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":27}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":29}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":53}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":54}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":55}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":57}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":72}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":75}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":111}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":123}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":124}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":127}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":159}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":26,"column":171}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":27,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":27,"column":13}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":27,"column":17}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":27,"column":39}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":27,"column":41}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":28,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":28,"column":5}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":28,"column":6}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":28,"column":7}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":29,"column":0}},{"source":"../../../src/internal/operators/last.ts","name":null,"original":{"line":54,"column":1},"generated":{"line":29,"column":3}}],"sources":{"../../../src/internal/operators/last.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 { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\n\n/* tslint:disable:max-line-length */\nexport function last<T, D = T>(\n predicate?: null,\n defaultValue?: D\n): OperatorFunction<T, T | D>;\nexport function last<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 last<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 * Returns an Observable that emits only the last item emitted by the source Observable.\n * It optionally takes a predicate function as a parameter, in which case, rather than emitting\n * the last item from the source Observable, the resulting Observable will emit the last item\n * from the source Observable that satisfies the predicate.\n *\n * ![](last.png)\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 * @param {function} [predicate] - The condition any source emitted item has to satisfy.\n * @param {any} [defaultValue] - An optional default value to provide if last\n * predicate isn't met or no values were emitted.\n * @return {Observable} An Observable that emits only the last item satisfying the given condition\n * from the source, or an NoSuchElementException if no such items are emitted.\n * @throws - Throws if no items that match the predicate are emitted by the source Observable.\n */\nexport function last<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 takeLast(1),\n hasDefaultValue ? defaultIfEmpty<T | D>(defaultValue) : throwIfEmpty(() => new EmptyError()),\n );\n}\n"},"lineCount":null}},"hash":"a7d68c2c112fccaa0b253c14858b52f9","cacheData":{"env":{}}}