Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
758 bytes
|
Line | |
---|
1 | var baseRest = require('./_baseRest'),
|
---|
2 | pullAll = require('./pullAll');
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * Removes all given values from `array` using
|
---|
6 | * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
---|
7 | * for equality comparisons.
|
---|
8 | *
|
---|
9 | * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
|
---|
10 | * to remove elements from an array by predicate.
|
---|
11 | *
|
---|
12 | * @static
|
---|
13 | * @memberOf _
|
---|
14 | * @since 2.0.0
|
---|
15 | * @category Array
|
---|
16 | * @param {Array} array The array to modify.
|
---|
17 | * @param {...*} [values] The values to remove.
|
---|
18 | * @returns {Array} Returns `array`.
|
---|
19 | * @example
|
---|
20 | *
|
---|
21 | * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
|
---|
22 | *
|
---|
23 | * _.pull(array, 'a', 'c');
|
---|
24 | * console.log(array);
|
---|
25 | * // => ['b', 'b']
|
---|
26 | */
|
---|
27 | var pull = baseRest(pullAll);
|
---|
28 |
|
---|
29 | module.exports = pull;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.