array.some

1.0.0 • Public • Published

array.some

tests whether some element in the array passes the test implemented by the provided function


Build StatusCode Coverage 100%ISC LicenseNodeJS

JavaScript Style Guide

api

const some = require('array.some')

some(array, callback)

  • array the array to be processed by the provided function
  • callback function to test for each element, taking 3 arguments:
    • currentValue the current element being processed in the array
    • index the index of the current element being processed in the array
    • array the array some() was called upon

example

const some = require('array.some')
 
some([1, 2, 3, 4, 5, 6, 7, 8, 9], isBiggerThan5)// true
 
function isBiggerThan5 (ele) {
  return ele > 5
}
 

ISC License (ISC)

Readme

Keywords

Package Sidebar

Install

npm i array.some

Weekly Downloads

709

Version

1.0.0

License

ISC

Last publish

Collaborators

  • quim