1.0.12 • Published 6 years ago

@kingjs/linq.all v1.0.12

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

@kingjs/linq.all

Returns true if all elements of a sequence satisfy a condition.

Usage

require('kingjs');
var assert = require('assert');
var All = require('@kingjs/linq.all');

var sequence = [0, 1, 2];

assert(sequence[All](function(o) { return o < 3; }));
assert(!sequence[All](function(o) { return o < 2; }));

API

all(this, predicate)

Parameters

  • this: An IEnumerable that contains the elements to which the predicate will be applied.
  • predicate: A function to test each element for a condition.

Returns

true if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false.

Install

With npm installed, run

$ npm install @kingjs/linq.all

Dependencies

PackageVersion
@kingjs/i-enumerable^1.0.6
@kingjs/i-enumerator^1.0.7
@kingjs/reflect.export-extension^1.0.1

Source

https://repository.kingjs.net/linq/all

License

MIT

Analytics

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago