starry.every

4.0.0 • Public • Published

Member of the starry suite—modular functions for iterable objects.

npm node

Status

Applies to the whole suite.

Build Status Coverage Status

Usage

function every<T = any>(
  iterable: Iterable<T>,
  predicate: (item: T) => boolean = x => x as T & boolean
  ): boolean

Returns whether every element in the iterable satisfies the predicate.

every called on an empty iterable is vacuously true.

Parameters:

  • iterable: Iterable<T>
  • predicate: (T) => boolean. Default: x => x

Returns: boolean

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 4.0.0
    3
    • latest

Version History

Package Sidebar

Install

npm i starry.every

Weekly Downloads

3

Version

4.0.0

License

MIT

Unpacked Size

4.59 kB

Total Files

9

Last publish

Collaborators

  • seangenabe