lodash.clone
Advanced tools
Comparing version 4.0.2 to 4.0.3
21
index.js
/** | ||
* lodash 4.0.2 (Custom Build) <https://lodash.com/> | ||
* lodash 4.0.3 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
@@ -567,2 +567,5 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
function initCloneObject(object) { | ||
if (isPrototype(object)) { | ||
return {}; | ||
} | ||
var Ctor = object.constructor; | ||
@@ -618,2 +621,16 @@ return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined); | ||
/** | ||
* Checks if `value` is likely a prototype object. | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`. | ||
*/ | ||
function isPrototype(value) { | ||
var Ctor = value && value.constructor, | ||
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; | ||
return value === proto; | ||
} | ||
/** | ||
* Creates a shallow clone of `value`. | ||
@@ -753,4 +770,2 @@ * | ||
function isObject(value) { | ||
// Avoid a V8 JIT bug in Chrome 19-20. | ||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details. | ||
var type = typeof value; | ||
@@ -757,0 +772,0 @@ return !!value && (type == 'object' || type == 'function'); |
{ | ||
"name": "lodash.clone", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "The lodash method `_.clone` exported as a module.", | ||
@@ -8,3 +8,3 @@ "homepage": "https://lodash.com/", | ||
"license": "MIT", | ||
"keywords": "lodash, lodash-modularized, stdlib, util, clone", | ||
"keywords": "lodash-modularized, clone", | ||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", | ||
@@ -11,0 +11,0 @@ "contributors": [ |
@@ -1,2 +0,2 @@ | ||
# lodash.clone v4.0.2 | ||
# lodash.clone v4.0.3 | ||
@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.clone` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [documentation](https://lodash.com/docs#clone) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.clone) for more details. | ||
See the [documentation](https://lodash.com/docs#clone) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.clone) 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
24952
752