@kingjs/linq.any

Returns true if any element of a sequence satisfies a condition.

Stats

StarsIssuesVersionUpdatedCreatedSize
@kingjs/linq.any
1.0.113 years ago3 years agoMinified + gzip package size for @kingjs/linq.any in KB

Readme

@kingjs/linq.any

Returns true if any element of a sequence satisfies a condition.

Usage

require('kingjs');
var assert = require('assert');
var Any = require('@kingjs/linq.any');

var sequence = [0, 1, 2];

assert(sequence[Any]());
assert(sequence[Any](function(o) { return o == 1; }));
assert(!sequence[Any](function(o) { return o == 3; }));

API

any(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 any elements in the source sequence pass the test in the specified predicate; otherwise, false.

Install

With npm installed, run

$ npm install @kingjs/linq.any

Dependencies

Package Version
@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/any

License

MIT

Analytics

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.