123456789101112131415161718192021 |
- var forOwn = require('./forOwn');
- var makeIterator = require('../function/makeIterator_');
- /**
- * Object some
- */
- function some(obj, callback, thisObj) {
- callback = makeIterator(callback, thisObj);
- var result = false;
- forOwn(obj, function(val, key) {
- if (callback(val, key, obj)) {
- result = true;
- return false; // break
- }
- });
- return result;
- }
- module.exports = some;
|