1.0.1 • Published 8 years ago

iterable-every v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

iterable-every

Returns whether all elements in the iterable satisfy the predicate. Like Array.prototype.every.

npm Build Status Coverage Status devDependency Status node

Usage

const every = require('iterable-every')

every(iterable, callback, thisArg)

  • iterable - An Iterable object (has a Symbol.iterator property).
  • callback - The predicate to test with, called with the following arguments on each iteration:
    • element - The current element of the iterable object on the iteration.
    • index - The index of the iteration.
    • iterable - A reference to iterable.
  • thisArg - Optional. The object that will be used as the context for callback.
  • Returns: a Boolean whether all elements satisfy the predicate.

Passing an empty iterable always returns true.

License

MIT

1.0.1

8 years ago

1.0.0-1

8 years ago