array.some

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
array.some
101.0.07 years ago7 years agoMinified + gzip package size for array.some in KB

Readme

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)