source: frontend/node_modules/underscore/modules/find.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 392 bytes
Line 
1import isArrayLike from './_isArrayLike.js';
2import findIndex from './findIndex.js';
3import findKey from './findKey.js';
4
5// Return the first value which passes a truth test.
6export default function find(obj, predicate, context) {
7 var keyFinder = isArrayLike(obj) ? findIndex : findKey;
8 var key = keyFinder(obj, predicate, context);
9 if (key !== void 0 && key !== -1) return obj[key];
10}
Note: See TracBrowser for help on using the repository browser.