Sha256: 9700202de39fd3ebea5549d6e6c9b9e66889aa2b6ed54b579a3b0ce2e924e42a

Contents?: true

Size: 1.01 KB

Versions: 49

Compression:

Stored size: 1.01 KB

Contents

import { Observable } from '../Observable';
import { every as higherOrder } from '../operators/every';

/**
 * Returns an Observable that emits whether or not every item of the source satisfies the condition specified.
 *
 * @example <caption>A simple example emitting true if all elements are less than 5, false otherwise</caption>
 *  Observable.of(1, 2, 3, 4, 5, 6)
 *     .every(x => x < 5)
 *     .subscribe(x => console.log(x)); // -> false
 *
 * @param {function} predicate A function for determining if an item meets a specified condition.
 * @param {any} [thisArg] Optional object to use for `this` in the callback.
 * @return {Observable} An Observable of booleans that determines if all items of the source Observable meet the condition specified.
 * @method every
 * @owner Observable
 */
export function every<T>(this: Observable<T>, predicate: (value: T, index: number, source: Observable<T>) => boolean,
                         thisArg?: any): Observable<boolean> {
  return higherOrder(predicate, thisArg)(this);
}

Version data entries

49 entries across 49 versions & 4 rubygems

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