lodash.pull
Advanced tools
Comparing version 3.0.1 to 4.0.0
52
index.js
/** | ||
* lodash 3.0.1 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* lodash 4.0.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
var baseIndexOf = require('lodash._baseindexof'); | ||
var pullAll = require('lodash.pullall'), | ||
rest = require('lodash.rest'); | ||
/** Used for native method references. */ | ||
var arrayProto = Array.prototype; | ||
/** Native method references. */ | ||
var splice = arrayProto.splice; | ||
/** | ||
* Removes all provided values from `array` using `SameValueZero` for equality | ||
* comparisons. | ||
* Removes all provided values from `array` using | ||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) | ||
* for equality comparisons. | ||
* | ||
* **Notes:** | ||
* - Unlike `_.without`, this method mutates `array`. | ||
* - `SameValueZero` comparisons are like strict equality comparisons, e.g. `===`, | ||
* except that `NaN` matches `NaN`. See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) | ||
* for more details. | ||
* **Note:** Unlike `_.without`, this method mutates `array`. | ||
* | ||
@@ -41,24 +33,4 @@ * @static | ||
*/ | ||
function pull() { | ||
var args = arguments, | ||
array = args[0]; | ||
var pull = rest(pullAll); | ||
if (!(array && array.length)) { | ||
return array; | ||
} | ||
var index = 0, | ||
indexOf = baseIndexOf, | ||
length = args.length; | ||
while (++index < length) { | ||
var fromIndex = 0, | ||
value = args[index]; | ||
while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { | ||
splice.call(array, fromIndex, 1); | ||
} | ||
} | ||
return array; | ||
} | ||
module.exports = pull; |
{ | ||
"name": "lodash.pull", | ||
"version": "3.0.1", | ||
"description": "The modern build of lodash’s `_.pull` as a module.", | ||
"version": "4.0.0", | ||
"description": "The lodash method `_.pull` exported as a module.", | ||
"homepage": "https://lodash.com/", | ||
"icon": "https://lodash.com/icon.svg", | ||
"license": "MIT", | ||
"keywords": "lodash, lodash-modularized, stdlib, util", | ||
"keywords": "lodash, lodash-modularized, stdlib, util, pull", | ||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", | ||
"contributors": [ | ||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", | ||
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)", | ||
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)", | ||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)", | ||
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)", | ||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)" | ||
@@ -20,4 +18,5 @@ ], | ||
"dependencies": { | ||
"lodash._baseindexof": "^3.0.0" | ||
"lodash.pullall": "^3.0.0", | ||
"lodash.rest": "^4.0.0" | ||
} | ||
} |
@@ -1,4 +0,4 @@ | ||
# lodash.pull v3.0.1 | ||
# lodash.pull v4.0.0 | ||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.pull` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. | ||
The [lodash](https://lodash.com/) method `_.pull` exported as a [Node.js](https://nodejs.org/) module. | ||
@@ -8,3 +8,2 @@ ## Installation | ||
Using npm: | ||
```bash | ||
@@ -15,4 +14,3 @@ $ {sudo -H} npm i -g npm | ||
In Node.js/io.js: | ||
In Node.js: | ||
```js | ||
@@ -22,2 +20,2 @@ var pull = require('lodash.pull'); | ||
See the [documentation](https://lodash.com/docs#pull) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.pull) for more details. | ||
See the [documentation](https://lodash.com/docs#pull) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.pull) for more details. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3568
2
33
19
+ Addedlodash.pullall@^3.0.0
+ Addedlodash.rest@^4.0.0
+ Addedlodash.rest@4.0.5(transitive)
- Removedlodash._baseindexof@^3.0.0
- Removedlodash._baseindexof@3.1.0(transitive)