Socket
Socket
Sign inDemoInstall

lodash._baseclone

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash._baseclone - npm Package Compare versions

Comparing version 4.5.1 to 4.5.2

48

index.js
/**
* lodash 4.5.1 (Custom Build) <https://lodash.com/>
* lodash 4.5.2 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`

@@ -127,2 +127,3 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>

function addMapEntry(map, pair) {
// Don't return `Map#set` because it doesn't return the map instance in IE 11.
map.set(pair[0], pair[1]);

@@ -335,3 +336,3 @@ return map;

var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;

@@ -883,5 +884,3 @@ /**

}
var Ctor = buffer.constructor,
result = new Ctor(buffer.length);
var result = new buffer.constructor(buffer.length);
buffer.copy(result);

@@ -899,7 +898,4 @@ return result;

function cloneArrayBuffer(arrayBuffer) {
var Ctor = arrayBuffer.constructor,
result = new Ctor(arrayBuffer.byteLength),
view = new Uint8Array(result);
view.set(new Uint8Array(arrayBuffer));
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
return result;

@@ -916,4 +912,3 @@ }

function cloneMap(map) {
var Ctor = map.constructor;
return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
return arrayReduce(mapToArray(map), addMapEntry, new map.constructor);
}

@@ -929,5 +924,3 @@

function cloneRegExp(regexp) {
var Ctor = regexp.constructor,
result = new Ctor(regexp.source, reFlags.exec(regexp));
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;

@@ -945,4 +938,3 @@ return result;

function cloneSet(set) {
var Ctor = set.constructor;
return arrayReduce(setToArray(set), addSetEntry, new Ctor);
return arrayReduce(setToArray(set), addSetEntry, new set.constructor);
}

@@ -958,3 +950,3 @@

function cloneSymbol(symbol) {
return Symbol ? Object(symbolValueOf.call(symbol)) : {};
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}

@@ -971,7 +963,4 @@

function cloneTypedArray(typedArray, isDeep) {
var arrayBuffer = typedArray.buffer,
buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
Ctor = typedArray.constructor;
return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}

@@ -1097,3 +1086,3 @@

function getNative(object, key) {
var value = object == null ? undefined : object[key];
var value = object[key];
return isNative(value) ? value : undefined;

@@ -1171,3 +1160,3 @@ }

function initCloneObject(object) {
return (isFunction(object.constructor) && !isPrototype(object))
return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototypeOf(object))

@@ -1261,3 +1250,3 @@ : {};

var Ctor = value && value.constructor,
proto = (isFunction(Ctor) && Ctor.prototype) || objectProto;
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;

@@ -1373,4 +1362,3 @@ return value === proto;

function isArrayLike(value) {
return value != null &&
!(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
return value != null && isLength(getLength(value)) && !isFunction(value);
}

@@ -1443,4 +1431,4 @@

// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array constructors, and
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
// in Safari 8 which returns 'object' for typed array and weak map constructors,
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : '';

@@ -1447,0 +1435,0 @@ return tag == funcTag || tag == genTag;

{
"name": "lodash._baseclone",
"version": "4.5.1",
"version": "4.5.2",
"description": "The internal lodash function `baseClone` exported as a module.",

@@ -11,3 +11,3 @@ "homepage": "https://lodash.com/",

"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"

@@ -14,0 +14,0 @@ ],

@@ -1,2 +0,2 @@

# lodash._baseclone v4.5.1
# lodash._baseclone v4.5.2

@@ -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.1-npm-packages/lodash._baseclone) for more details.
See the [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash._baseclone) for more details.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc