1 line
11 KiB
JSON
1 line
11 KiB
JSON
{"id":"../node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.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":"./distinctUntilChanged","loc":{"line":2,"column":37},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js"}],"generated":{"js":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.distinctUntilKeyChanged = distinctUntilKeyChanged;\n\nvar _distinctUntilChanged = require(\"./distinctUntilChanged\");\n\n/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */\nfunction distinctUntilKeyChanged(key, compare) {\n return (0, _distinctUntilChanged.distinctUntilChanged)(function (x, y) {\n return compare ? compare(x[key], y[key]) : x[key] === y[key];\n });\n}","map":{"mappings":[{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":73,"column":0},"generated":{"line":8,"column":0}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":1,"column":0},"generated":{"line":10,"column":0}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":74,"column":2},"generated":{"line":11,"column":0}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":11,"column":9}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":74,"column":2},"generated":{"line":11,"column":32}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":74,"column":30},"generated":{"line":11,"column":33}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":74,"column":2},"generated":{"line":11,"column":36}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":74,"column":37},"generated":{"line":11,"column":38}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":74,"column":2},"generated":{"line":11,"column":45}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":74,"column":46},"generated":{"line":11,"column":47}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":12,"column":0}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":12,"column":9}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":12,"column":57}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":12,"column":67}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":12,"column":68}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":12,"column":70}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":12,"column":71}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":12,"column":73}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":0}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":11}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":18}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":21}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":28}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":29}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":30}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":31}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":34}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":35}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":37}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":38}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":39}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":42}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":43}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":44}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":47}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":48}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":49}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":52}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":53}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":58}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":59}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":60}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":63}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":13,"column":64}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":14,"column":0}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":14,"column":3}},{"source":"../../../src/internal/operators/distinctUntilKeyChanged.ts","name":null,"original":{"line":75,"column":1},"generated":{"line":14,"column":4}}],"sources":{"../../../src/internal/operators/distinctUntilKeyChanged.ts":"import { distinctUntilChanged } from './distinctUntilChanged';\nimport { MonoTypeOperatorFunction } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function distinctUntilKeyChanged<T>(key: keyof T): MonoTypeOperatorFunction<T>;\nexport function distinctUntilKeyChanged<T, K extends keyof T>(key: K, compare: (x: T[K], y: T[K]) => boolean): MonoTypeOperatorFunction<T>;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item,\n * using a property accessed by using the key provided to check if the two items are distinct.\n *\n * If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.\n *\n * If a comparator function is not provided, an equality check is used by default.\n *\n * ## Examples\n * An example comparing the name of persons\n * ```typescript\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * of<Person>(\n * { age: 4, name: 'Foo'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo'},\n * { age: 6, name: 'Foo'},\n * ).pipe(\n * distinctUntilKeyChanged('name'),\n * )\n * .subscribe(x => console.log(x));\n *\n * // displays:\n * // { age: 4, name: 'Foo' }\n * // { age: 7, name: 'Bar' }\n * // { age: 5, name: 'Foo' }\n * ```\n *\n * An example comparing the first letters of the name\n * ```typescript\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * of<Person>(\n * { age: 4, name: 'Foo1'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo2'},\n * { age: 6, name: 'Foo3'},\n * ).pipe(\n * distinctUntilKeyChanged('name', (x: string, y: string) => x.substring(0, 3) === y.substring(0, 3)),\n * )\n * .subscribe(x => console.log(x));\n *\n * // displays:\n * // { age: 4, name: 'Foo1' }\n * // { age: 7, name: 'Bar' }\n * // { age: 5, name: 'Foo2' }\n * ```\n *\n * @see {@link distinct}\n * @see {@link distinctUntilChanged}\n *\n * @param {string} key String key for object property lookup on each item.\n * @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source.\n * @return {Observable} An Observable that emits items from the source Observable with distinct values based on the key specified.\n * @method distinctUntilKeyChanged\n * @owner Observable\n */\nexport function distinctUntilKeyChanged<T, K extends keyof T>(key: K, compare?: (x: T[K], y: T[K]) => boolean): MonoTypeOperatorFunction<T> {\n return distinctUntilChanged((x: T, y: T) => compare ? compare(x[key], y[key]) : x[key] === y[key]);\n}\n"},"lineCount":null}},"hash":"4d63473382f0e649a1b34e607c497804","cacheData":{"env":{}}} |