lodash.clone
Advanced tools
Comparing version 2.2.1 to 2.3.0
32
index.js
/** | ||
* Lo-Dash 2.2.1 (Custom Build) <http://lodash.com/> | ||
* Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/> | ||
* Build: `lodash modularize modern exports="npm" -o ./npm/` | ||
@@ -13,3 +13,3 @@ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> | ||
/** | ||
* Creates a clone of `value`. If `deep` is `true` nested objects will also | ||
* Creates a clone of `value`. If `isDeep` is `true` nested objects will also | ||
* be cloned, otherwise they will be assigned by reference. If a callback | ||
@@ -24,3 +24,3 @@ * is provided it will be executed to produce the cloned values. If the | ||
* @param {*} value The value to clone. | ||
* @param {boolean} [deep=false] Specify a deep clone. | ||
* @param {boolean} [isDeep=false] Specify a deep clone. | ||
* @param {Function} [callback] The function to customize cloning values. | ||
@@ -31,13 +31,13 @@ * @param {*} [thisArg] The `this` binding of `callback`. | ||
* | ||
* var stooges = [ | ||
* { 'name': 'moe', 'age': 40 }, | ||
* { 'name': 'larry', 'age': 50 } | ||
* var characters = [ | ||
* { 'name': 'barney', 'age': 36 }, | ||
* { 'name': 'fred', 'age': 40 } | ||
* ]; | ||
* | ||
* var shallow = _.clone(stooges); | ||
* shallow[0] === stooges[0]; | ||
* var shallow = _.clone(characters); | ||
* shallow[0] === characters[0]; | ||
* // => true | ||
* | ||
* var deep = _.clone(stooges, true); | ||
* deep[0] === stooges[0]; | ||
* var deep = _.clone(characters, true); | ||
* deep[0] === characters[0]; | ||
* // => false | ||
@@ -55,13 +55,13 @@ * | ||
*/ | ||
function clone(value, deep, callback, thisArg) { | ||
function clone(value, isDeep, callback, thisArg) { | ||
// allows working with "Collections" methods without using their `index` | ||
// and `collection` arguments for `deep` and `callback` | ||
if (typeof deep != 'boolean' && deep != null) { | ||
// and `collection` arguments for `isDeep` and `callback` | ||
if (typeof isDeep != 'boolean' && isDeep != null) { | ||
thisArg = callback; | ||
callback = deep; | ||
deep = false; | ||
callback = isDeep; | ||
isDeep = false; | ||
} | ||
return baseClone(value, deep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); | ||
return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); | ||
} | ||
module.exports = clone; |
{ | ||
"name": "lodash.clone", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "The Lo-Dash function `_.clone` as a Node.js module generated by lodash-cli.", | ||
@@ -11,3 +11,3 @@ "homepage": "http://lodash.com/custom-builds", | ||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", | ||
"Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com/)", | ||
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)", | ||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)", | ||
@@ -19,5 +19,5 @@ "Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)" | ||
"dependencies": { | ||
"lodash._baseclone": "~2.2.1", | ||
"lodash._basecreatecallback": "~2.2.1" | ||
"lodash._baseclone": "~2.3.0", | ||
"lodash._basecreatecallback": "~2.3.0" | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# lodash.clone v2.2.1 | ||
# lodash.clone v2.3.0 | ||
@@ -7,3 +7,3 @@ The [Lo-Dash](http://lodash.com/) function [`_.clone`](http://lodash.com/docs#clone) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). | ||
| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") | | ||
| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | | ||
|---| | ||
@@ -14,4 +14,4 @@ | [John-David Dalton](http://allyoucanleet.com/) | | ||
| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](http://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | | ||
| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | | ||
|---|---|---| | ||
| [Blaine Bublitz](http://iceddev.com/) | [Kit Cambridge](http://kitcambridge.github.io/) | [Mathias Bynens](http://mathiasbynens.be/) | | ||
| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | |
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
5474
+ Addedlodash._arraypool@2.3.0(transitive)
+ Addedlodash._basebind@2.3.0(transitive)
+ Addedlodash._baseclone@2.3.0(transitive)
+ Addedlodash._basecreate@2.3.0(transitive)
+ Addedlodash._basecreatecallback@2.3.0(transitive)
+ Addedlodash._basecreatewrapper@2.3.0(transitive)
+ Addedlodash._createwrapper@2.3.0(transitive)
+ Addedlodash._getarray@2.3.0(transitive)
+ Addedlodash._maxpoolsize@2.3.0(transitive)
+ Addedlodash._objecttypes@2.3.0(transitive)
+ Addedlodash._releasearray@2.3.0(transitive)
+ Addedlodash._renative@2.3.0(transitive)
+ Addedlodash._setbinddata@2.3.0(transitive)
+ Addedlodash._shimkeys@2.3.0(transitive)
+ Addedlodash._slice@2.3.0(transitive)
+ Addedlodash.assign@2.3.0(transitive)
+ Addedlodash.bind@2.3.0(transitive)
+ Addedlodash.foreach@2.3.0(transitive)
+ Addedlodash.forown@2.3.0(transitive)
+ Addedlodash.identity@2.3.0(transitive)
+ Addedlodash.isarray@2.3.0(transitive)
+ Addedlodash.isfunction@2.3.0(transitive)
+ Addedlodash.isobject@2.3.0(transitive)
+ Addedlodash.keys@2.3.0(transitive)
+ Addedlodash.noop@2.3.0(transitive)
+ Addedlodash.support@2.3.0(transitive)
- Removedlodash._arraypool@2.2.1(transitive)
- Removedlodash._baseclone@2.2.1(transitive)
- Removedlodash._basecreatecallback@2.2.1(transitive)
- Removedlodash._createbound@2.2.1(transitive)
- Removedlodash._createobject@2.2.1(transitive)
- Removedlodash._getarray@2.2.1(transitive)
- Removedlodash._maxpoolsize@2.2.1(transitive)
- Removedlodash._noop@2.2.1(transitive)
- Removedlodash._objecttypes@2.2.1(transitive)
- Removedlodash._releasearray@2.2.1(transitive)
- Removedlodash._renative@2.2.1(transitive)
- Removedlodash._setbinddata@2.2.1(transitive)
- Removedlodash._shimkeys@2.2.1(transitive)
- Removedlodash._slice@2.2.1(transitive)
- Removedlodash.assign@2.2.1(transitive)
- Removedlodash.bind@2.2.1(transitive)
- Removedlodash.foreach@2.2.1(transitive)
- Removedlodash.forown@2.2.1(transitive)
- Removedlodash.identity@2.2.1(transitive)
- Removedlodash.isarray@2.2.1(transitive)
- Removedlodash.isfunction@2.2.1(transitive)
- Removedlodash.isobject@2.2.1(transitive)
- Removedlodash.keys@2.2.1(transitive)
- Removedlodash.support@2.2.1(transitive)
Updatedlodash._baseclone@~2.3.0