var some = require('./some');
var makeIterator = require('../function/makeIterator_');
/**
* Returns first item that matches criteria
*/
function find(obj, callback, thisObj) {
callback = makeIterator(callback, thisObj);
var result;
some(obj, function(value, key, obj) {
if (callback(value, key, obj)) {
result = value;
return true; //break
}
});
return result;
}
module.exports = find;
# |
Change |
User |
Description |
Committed |
|
#1
|
23539 |
jenbottom |
Adding the basic code for ember test appk, created with 'ember new' command |
|
|