Socket
Socket
Sign inDemoInstall

clone

Package Overview
Dependencies
0
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

12

clone.js

@@ -0,1 +1,3 @@

var util = require('util');
module.exports = clone;

@@ -43,3 +45,3 @@

// Now continue cloning...
if (parent.constructor.name === 'Array') {
if (util.isArray(parent)) {
child = [];

@@ -49,5 +51,5 @@ for(i in parent)

}
else if (parent.constructor.name === 'Date')
else if (util.isDate(parent))
child = new Date(parent.getTime());
else if (parent.constructor.name === 'RegExp')
else if (util.isRegExp(parent))
child = new RegExp(parent.source);

@@ -94,5 +96,5 @@ else {

}
else if (parent.constructor.name === 'Date')
else if (util.isDate(parent))
child = new Date(parent.getTime() );
else if (parent.constructor.name === 'RegExp')
else if (util.isRegExp(parent))
child = new RegExp(parent.source);

@@ -99,0 +101,0 @@ else {

@@ -11,3 +11,3 @@ {

],
"version": "0.1.2",
"version": "0.1.3",
"repository": {

@@ -14,0 +14,0 @@ "type": "git",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc