flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
12
VISUALIZACION/node_modules/underscore/modules/findKey.js
generated
vendored
Executable file
12
VISUALIZACION/node_modules/underscore/modules/findKey.js
generated
vendored
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
import cb from './_cb.js';
|
||||
import keys from './keys.js';
|
||||
|
||||
// Returns the first key on an object that passes a truth test.
|
||||
export default function findKey(obj, predicate, context) {
|
||||
predicate = cb(predicate, context);
|
||||
var _keys = keys(obj), key;
|
||||
for (var i = 0, length = _keys.length; i < length; i++) {
|
||||
key = _keys[i];
|
||||
if (predicate(obj[key], key, obj)) return key;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue