Tumortisch-Dist/resources/app/node_modules/rxjs/operator/pluck.js.map

1 line
1.6 KiB
Plaintext
Raw Normal View History

2021-06-15 16:00:08 +02:00
{"version":3,"file":"pluck.js","sourceRoot":"","sources":["../../src/operator/pluck.ts"],"names":[],"mappings":";AACA,sBAAqC,oBAAoB,CAAC,CAAA;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH;IAAiD,oBAAuB;SAAvB,WAAuB,CAAvB,sBAAuB,CAAvB,IAAuB;QAAvB,mCAAuB;;IACtE,MAAM,CAAC,aAAW,eAAI,UAAU,CAAC,CAAC,IAAI,CAAkB,CAAC;AAC3D,CAAC;AAFe,aAAK,QAEpB,CAAA","sourcesContent":["import { Observable } from '../Observable';\nimport { pluck as higherOrder } from '../operators/pluck';\n\n/**\n * Maps each source value (an object) to its specified nested property.\n *\n * <span class=\"informal\">Like {@link map}, but meant only for picking one of\n * the nested properties of every emitted object.</span>\n *\n * <img src=\"./img/pluck.png\" width=\"100%\">\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 <caption>Map every click to the tagName of the clicked target element</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var tagNames = clicks.pluck('target', 'tagName');\n * tagNames.subscribe(x => console.log(x));\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<T, R>(this: Observable<T>, ...properties: string[]): Observable<R> {\n return higherOrder(...properties)(this) as Observable<R>;\n}\n"]}