{"id":"Td+/","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/pluck.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/operators/pluck.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395749058},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/package.json","includedInParent":true,"mtime":1545395355370},{"name":"./map","loc":{"line":2,"column":20},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/pluck.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/map.js"}],"generated":{"js":"\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.pluck=e;var r=require(\"./map\");function e(){for(var e=[],n=0;nLike {@link map}, but meant only for picking one of\n * the nested properties of every emitted object.\n *\n * ![](pluck.png)\n *\n * Given a list of strings describing a path to an object property, retrieves\n * the value of a specified nested property from all values in the source\n * Observable. If a property can't be resolved, it will return `undefined` for\n * that value.\n *\n * ## Example\n * Map every click to the tagName of the clicked target element\n * ```javascript\n * const clicks = fromEvent(document, 'click');\n * const tagNames = clicks.pipe(pluck('target', 'tagName'));\n * tagNames.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link map}\n *\n * @param {...string} properties The nested properties to pluck from each source\n * value (an object).\n * @return {Observable} A new Observable of property values from the source values.\n * @method pluck\n * @owner Observable\n */\nexport function pluck(...properties: string[]): OperatorFunction {\n const length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return (source: Observable) => map(plucker(properties, length))(source as any);\n}\n\nfunction plucker(props: string[], length: number): (x: string) => any {\n const mapper = (x: string) => {\n let currentProp = x;\n for (let i = 0; i < length; i++) {\n const p = currentProp[props[i]];\n if (typeof p !== 'undefined') {\n currentProp = p;\n } else {\n return undefined;\n }\n }\n return currentProp;\n };\n\n return mapper;\n}\n"},"lineCount":null}},"hash":"2e011eddaa7cebbf5bb84bd98deddb41","cacheData":{"env":{}}}