Sha256: ee8d781022215b5ddbe44939d4d2290c8c770db96a4ef20c36d1ecd04245e45c

Contents?: true

Size: 1.35 KB

Versions: 49

Compression:

Stored size: 1.35 KB

Contents

/** PURE_IMPORTS_START .._operators_pluck PURE_IMPORTS_END */
import { pluck as higherOrder } from '../operators/pluck';
/**
 * Maps each source value (an object) to its specified nested property.
 *
 * <span class="informal">Like {@link map}, but meant only for picking one of
 * the nested properties of every emitted object.</span>
 *
 * <img src="./img/pluck.png" width="100%">
 *
 * Given a list of strings describing a path to an object property, retrieves
 * the value of a specified nested property from all values in the source
 * Observable. If a property can't be resolved, it will return `undefined` for
 * that value.
 *
 * @example <caption>Map every click to the tagName of the clicked target element</caption>
 * var clicks = Rx.Observable.fromEvent(document, 'click');
 * var tagNames = clicks.pluck('target', 'tagName');
 * tagNames.subscribe(x => console.log(x));
 *
 * @see {@link map}
 *
 * @param {...string} properties The nested properties to pluck from each source
 * value (an object).
 * @return {Observable} A new Observable of property values from the source values.
 * @method pluck
 * @owner Observable
 */
export function pluck() {
    var properties = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        properties[_i - 0] = arguments[_i];
    }
    return higherOrder.apply(void 0, properties)(this);
}
//# sourceMappingURL=pluck.js.map

Version data entries

49 entries across 49 versions & 4 rubygems

Version Path
ilog-0.4.1 node_modules/rxjs/_esm5/operator/pluck.js
ilog-0.4.0 node_modules/rxjs/_esm5/operator/pluck.js
ilog-0.3.3 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-18.0.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.21.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.20.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.19.1 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.19.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.18.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.17.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.16.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.15.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.14.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.13.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.12.2 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.12.1 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.12.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.11.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.10.0 node_modules/rxjs/_esm5/operator/pluck.js
govuk_publishing_components-17.9.0 node_modules/rxjs/_esm5/operator/pluck.js