iterable-every

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i iterable-every

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • seangenabe