some-own
Like [].some
but for objects.
npm install some-own
const someOwn =
API
someOwn(object, callback, scope: undefined)
@param
object
is the object to iteratecallback
receives(value, key, object)
scope
is thethis
context used to.call
callback
@return boolean
- Breaks from the loop and returns
true
if anycallback
iteration result returns truthy - Else returns
false
Usage
const someOwn =
// false // true // true
let array = // truearraylength // 1
let array = // falsearraylength // 2