|
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:
552 bytes
|
| Line | |
|---|
| 1 | define(['./_cb', './_isArrayLike', './keys'], function (_cb, _isArrayLike, keys) {
|
|---|
| 2 |
|
|---|
| 3 | // Determine if at least one element in the object passes a truth test.
|
|---|
| 4 | function some(obj, predicate, context) {
|
|---|
| 5 | predicate = _cb(predicate, context);
|
|---|
| 6 | var _keys = !_isArrayLike(obj) && keys(obj),
|
|---|
| 7 | length = (_keys || obj).length;
|
|---|
| 8 | for (var index = 0; index < length; index++) {
|
|---|
| 9 | var currentKey = _keys ? _keys[index] : index;
|
|---|
| 10 | if (predicate(obj[currentKey], currentKey, obj)) return true;
|
|---|
| 11 | }
|
|---|
| 12 | return false;
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | return some;
|
|---|
| 16 |
|
|---|
| 17 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.