Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

udc

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

udc - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "udc",
"version": "1.0.0",
"version": "1.0.1",
"description": "UltraDeepClone - A complete (as possible) deep-clone algorithm that can clone objects with cycles.",

@@ -5,0 +5,0 @@ "main": "udc.js",

@@ -18,3 +18,3 @@ (function (root, factory) {

// Node.js has a lot of silly properties on their "TypedArray" implementation
// Node.js has a lot of silly enumeral properties on its "TypedArray" implementation
var typedArrayPropertyFilter = [

@@ -35,24 +35,27 @@ 'BYTES_PER_ELEMENT',

var cloneFunctions = {
"[object Null]" : primitiveCloner,
"[object Undefined]" : primitiveCloner,
"[object Number]" : primitiveCloner,
"[object String]" : primitiveCloner,
"[object Boolean]" : primitiveCloner,
"[object RegExp]" : makeCloner(cloneRegExp),
"[object Date]" : makeCloner(cloneDate),
"[object Function]" : makeRecursiveCloner(makeCloner(cloneFunction), functionPropertyFilter),
"[object Object]" : makeRecursiveCloner(makeCloner(cloneObject)),
"[object Array]" : makeRecursiveCloner(makeCloner(cloneArray)),
"[object Int8Array]" : typedArrayCloner,
"[object Uint8Array]" : typedArrayCloner,
"[object Uint8ClampedArray]" : typedArrayCloner,
"[object Int16Array]" : typedArrayCloner,
"[object Uint16Array]" : typedArrayCloner,
"[object Int32Array]" : typedArrayCloner,
"[object Uint32Array]" : typedArrayCloner,
"[object Float32Array]" : typedArrayCloner,
"[object Float64Array]" :typedArrayCloner
};
function typeString (type) {
return '[object ' + type + ']';
}
var cloneFunctions = {};
cloneFunctions[typeString('RegExp')] = makeCloner(cloneRegExp);
cloneFunctions[typeString('Date')] = makeCloner(cloneDate);
cloneFunctions[typeString('Function')] = makeRecursiveCloner(makeCloner(cloneFunction), functionPropertyFilter);
cloneFunctions[typeString('Object')] = makeRecursiveCloner(makeCloner(cloneObject));
cloneFunctions[typeString('Array')] = makeRecursiveCloner(makeCloner(cloneArray));
['Null', 'Undefined', 'Number', 'String', 'Boolean']
.map(typeString)
.forEach(function (type) {
cloneFunctions[type] = primitiveCloner;
});
['Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array',
'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array']
.map(typeString)
.forEach(function (type) {
cloneFunctions[type] = typedArrayCloner;
});
function makeArguments (numberOfArgs) {

@@ -59,0 +62,0 @@ var letters = [];

Sorry, the diff of this file is not supported yet

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