From d2101a3f9aab5b791479e8a71b8bee6649acc2a7 Mon Sep 17 00:00:00 2001 From: Felipe Barriga Richards Date: Wed, 29 Jul 2015 13:07:45 -0300 Subject: [PATCH] lodash: added pullAt --- lodash/lodash-tests.ts | 1 + lodash/lodash.d.ts | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 877364ef0f..708908b151 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -283,6 +283,7 @@ result = <_.Dictionary>_.object([['moe', 30], ['larry', 40]]); result = <_.LoDashObjectWrapper<_.Dictionary>>_([['moe', 30], ['larry', 40]]).object(); result = _.pull([1, 2, 3, 1, 2, 3], 2, 3); +result = _.pullAt([1, 2, 3, 1, 2, 3], 2, 3); result = _.range(10); result = _.range(1, 11); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 7bbb65a54c..97e21f893f 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -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, + ...values: any[]): any[]; + + /** + * @see _.pull + **/ + pullAt( + array: List, + ...values: any[]): any[]; + } + //_.range interface LoDashStatic { /**