Merge pull request #2278 from kkolstad/lodash-some

Lodash Some
This commit is contained in:
Masahiro Wakame
2014-06-05 11:38:05 +09:00
2 changed files with 18 additions and 0 deletions
+2
View File
@@ -469,10 +469,12 @@ result = <number>_.size('curly');
result = <boolean>_.some([null, 0, 'yes', false], Boolean);
result = <boolean>_.some(foodsCombined, 'organic');
result = <boolean>_.some(foodsCombined, { 'type': 'meat' });
result = <boolean>_.some(foodsOrganic[0]);
result = <boolean>_.any([null, 0, 'yes', false], Boolean);
result = <boolean>_.any(foodsCombined, 'organic');
result = <boolean>_.any(foodsCombined, { 'type': 'meat' });
result = <boolean>_.any(foodsOrganic[0]);
result = <number[]>_.sortBy([1, 2, 3], function (num) { return Math.sin(num); });
result = <number[]>_.sortBy([1, 2, 3], function (num) { return this.sin(num); }, Math);
+16
View File
@@ -3933,6 +3933,14 @@ declare module _ {
callback?: ListIterator<T, boolean>,
thisArg?: any): boolean;
/**
* @see _.some
**/
some(
collection: {},
callback?: ListIterator<{}, boolean>,
thisArg?: any): boolean;
/**
* @see _.some
* @param pluckValue _.pluck style callback
@@ -4005,6 +4013,14 @@ declare module _ {
callback?: ListIterator<T, boolean>,
thisArg?: any): boolean;
/**
* @see _.some
**/
any(
collection: {},
callback?: ListIterator<{}, boolean>,
thisArg?: any): boolean;
/**
* @see _.some
* @param pluckValue _.pluck style callback