lodash._baseclone
Advanced tools
Comparing version 4.5.4 to 4.5.5
59
index.js
/** | ||
* lodash 4.5.4 (Custom Build) <https://lodash.com/> | ||
* lodash 4.5.5 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
@@ -49,3 +49,6 @@ * Copyright jQuery Foundation and other contributors <https://jquery.org/> | ||
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ | ||
/** | ||
* Used to match `RegExp` | ||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). | ||
*/ | ||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; | ||
@@ -321,3 +324,4 @@ | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -355,7 +359,7 @@ */ | ||
/** Used to detect maps, sets, and weakmaps. */ | ||
var dataViewCtorString = DataView ? (DataView + '') : '', | ||
mapCtorString = Map ? funcToString.call(Map) : '', | ||
promiseCtorString = Promise ? funcToString.call(Promise) : '', | ||
setCtorString = Set ? funcToString.call(Set) : '', | ||
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : ''; | ||
var dataViewCtorString = toSource(DataView), | ||
mapCtorString = toSource(Map), | ||
promiseCtorString = toSource(Promise), | ||
setCtorString = toSource(Set), | ||
weakMapCtorString = toSource(WeakMap); | ||
@@ -367,3 +371,3 @@ /** Used to convert symbols to primitives and strings. */ | ||
/** | ||
* Creates an hash object. | ||
* Creates a hash object. | ||
* | ||
@@ -1185,4 +1189,4 @@ * @private | ||
var result = objectToString.call(value), | ||
Ctor = result == objectTag ? value.constructor : null, | ||
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : ''; | ||
Ctor = result == objectTag ? value.constructor : undefined, | ||
ctorString = Ctor ? toSource(Ctor) : undefined; | ||
@@ -1328,2 +1332,21 @@ if (ctorString) { | ||
/** | ||
* Converts `func` to its source code. | ||
* | ||
* @private | ||
* @param {Function} func The function to process. | ||
* @returns {string} Returns the source code. | ||
*/ | ||
function toSource(func) { | ||
if (func != null) { | ||
try { | ||
return funcToString.call(func); | ||
} catch (e) {} | ||
try { | ||
return (func + ''); | ||
} catch (e) {} | ||
} | ||
return ''; | ||
} | ||
/** | ||
* Performs a | ||
@@ -1553,4 +1576,5 @@ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) | ||
/** | ||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. | ||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* Checks if `value` is the | ||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) | ||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* | ||
@@ -1629,10 +1653,7 @@ * @static | ||
function isNative(value) { | ||
if (value == null) { | ||
if (!isObject(value)) { | ||
return false; | ||
} | ||
if (isFunction(value)) { | ||
return reIsNative.test(funcToString.call(value)); | ||
} | ||
return isObjectLike(value) && | ||
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value); | ||
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; | ||
return pattern.test(toSource(value)); | ||
} | ||
@@ -1639,0 +1660,0 @@ |
{ | ||
"name": "lodash._baseclone", | ||
"version": "4.5.4", | ||
"version": "4.5.5", | ||
"description": "The internal lodash function `baseClone` exported as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash._baseclone v4.5.4 | ||
# lodash._baseclone v4.5.5 | ||
@@ -18,2 +18,2 @@ The internal [lodash](https://lodash.com/) function `baseClone` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [package source](https://github.com/lodash/lodash/blob/4.5.4-npm-packages/lodash._baseclone) for more details. | ||
See the [package source](https://github.com/lodash/lodash/blob/4.5.5-npm-packages/lodash._baseclone) 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
48873
1601