definitions for _.pull

This commit is contained in:
Brian Zengel
2013-10-13 19:59:57 -04:00
parent 9ac529100b
commit 2adbcb980a
2 changed files with 13 additions and 0 deletions
+2
View File
@@ -129,6 +129,8 @@ result = <number>_.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
result = <{[key: string]: any}>_.zipObject(['moe', 'larry'], [30, 40]);
result = <{[key: string]: any}>_.object(['moe', 'larry'], [30, 40]);
result = <any[]>_.pull([1, 2, 3, 1, 2, 3], 2, 3);
////////////////////////////////////////////////////////////////////////////////////////
//WHAT'S LEFT
////////////////////////////////////////////////////////////////////////////////////////
+11
View File
@@ -911,6 +911,17 @@ declare module _ {
callback?: ListIterator<any, any>,
thisArg?: any): any[];
/**
* 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.
**/
export function pull(
array: List<any>,
...values: any[]): any[];
/**
* Returns a copy of the array with all instances of the values removed.
* @param array The array to remove `values` from.