Merge pull request #5129 from fbarriga/fbarriga/lodash_pullAt

lodash: added pullAt
This commit is contained in:
Masahiro Wakame
2015-08-03 01:20:42 +09:00
2 changed files with 21 additions and 0 deletions

View File

@@ -283,6 +283,7 @@ result = <_.Dictionary<any>>_.object([['moe', 30], ['larry', 40]]);
result = <_.LoDashObjectWrapper<_.Dictionary<any>>>_([['moe', 30], ['larry', 40]]).object();
result = <number[]>_.pull([1, 2, 3, 1, 2, 3], 2, 3);
result = <number[]>_.pullAt([1, 2, 3, 1, 2, 3], 2, 3);
result = <number[]>_.range(10);
result = <number[]>_.range(1, 11);

20
lodash/lodash.d.ts vendored
View File

@@ -1123,6 +1123,26 @@ declare module _ {
...values: any[]): any[];
}
interface LoDashStatic {
/**
* Removes all provided values from the given array using strict equality for comparisons,
* i.e. ===.
* @param array The array to modify.
* @param values The values to remove.
* @return array.
**/
pullAt(
array: Array<any>,
...values: any[]): any[];
/**
* @see _.pull
**/
pullAt(
array: List<any>,
...values: any[]): any[];
}
//_.range
interface LoDashStatic {
/**