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.0.2 to 0.0.3

7

clone.js

@@ -14,8 +14,11 @@ var clone = function(param) {

// if date (not 100% safe)
else if (typeof param.getTime == 'function') {
else if (param instanceof Date) {
result = new Date(param.getTime());
}
// if array
else if (typeof param == 'array')
else if (param instanceof Array)
result = [];
// if regexp (lose rxp flags (i,g))
else if (param instanceof RegExp)
result = new RegExp(param.source);
// if object

@@ -22,0 +25,0 @@ else if (typeof param == 'object')

@@ -6,3 +6,3 @@ {

"tags": [ "clone", "object", "array", "function", "date" ],
"version": "0.0.2",
"version": "0.0.3",
"repository": {

@@ -9,0 +9,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