|
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:
391 bytes
|
| Line | |
|---|
| 1 | define(['./_isArrayLike', './findIndex', './findKey'], function (_isArrayLike, findIndex, findKey) {
|
|---|
| 2 |
|
|---|
| 3 | // Return the first value which passes a truth test.
|
|---|
| 4 | function find(obj, predicate, context) {
|
|---|
| 5 | var keyFinder = _isArrayLike(obj) ? findIndex : findKey;
|
|---|
| 6 | var key = keyFinder(obj, predicate, context);
|
|---|
| 7 | if (key !== void 0 && key !== -1) return obj[key];
|
|---|
| 8 | }
|
|---|
| 9 |
|
|---|
| 10 | return find;
|
|---|
| 11 |
|
|---|
| 12 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.