biofriction-wp-theme/node_modules/rxjs/operator/filter.js.map

1 line
2.9 KiB
Plaintext

{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../src/operator/filter.ts"],"names":[],"mappings":";AAEA,uBAA4C,qBAAqB,CAAC,CAAA;AASlE,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,gBAA+C,SAA+C,EACpE,OAAa;IACrC,MAAM,CAAC,eAAiB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACrD,CAAC;AAHe,cAAM,SAGrB,CAAA","sourcesContent":["\nimport { Observable } from '../Observable';\nimport { filter as higherOrderFilter } from '../operators/filter';\n\n/* tslint:disable:max-line-length */\nexport function filter<T, S extends T>(this: Observable<T>,\n predicate: (value: T, index: number) => value is S,\n thisArg?: any): Observable<S>;\nexport function filter<T>(this: Observable<T>,\n predicate: (value: T, index: number) => boolean,\n thisArg?: any): Observable<T>;\n/* tslint:enable:max-line-length */\n\n/**\n * Filter items emitted by the source Observable by only emitting those that\n * satisfy a specified predicate.\n *\n * <span class=\"informal\">Like\n * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\n * it only emits a value from the source if it passes a criterion function.</span>\n *\n * <img src=\"./img/filter.png\" width=\"100%\">\n *\n * Similar to the well-known `Array.prototype.filter` method, this operator\n * takes values from the source Observable, passes them through a `predicate`\n * function and only emits those values that yielded `true`.\n *\n * @example <caption>Emit only click events whose target was a DIV element</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var clicksOnDivs = clicks.filter(ev => ev.target.tagName === 'DIV');\n * clicksOnDivs.subscribe(x => console.log(x));\n *\n * @see {@link distinct}\n * @see {@link distinctUntilChanged}\n * @see {@link distinctUntilKeyChanged}\n * @see {@link ignoreElements}\n * @see {@link partition}\n * @see {@link skip}\n *\n * @param {function(value: T, index: number): boolean} predicate A function that\n * evaluates each value emitted by the source Observable. If it returns `true`,\n * the value is emitted, if `false` the value is not passed to the output\n * Observable. The `index` parameter is the number `i` for the i-th source\n * emission that has happened since the subscription, starting from the number\n * `0`.\n * @param {any} [thisArg] An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return {Observable} An Observable of values from the source that were\n * allowed by the `predicate` function.\n * @method filter\n * @owner Observable\n */\nexport function filter<T>(this: Observable<T>, predicate: (value: T, index: number) => boolean,\n thisArg?: any): Observable<T> {\n return higherOrderFilter(predicate, thisArg)(this);\n}\n"]}