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

traverse

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

traverse - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

test/date.js

21

index.js

@@ -54,4 +54,23 @@ module.exports = Traverse;

if (typeof src === 'object' && src !== null) {
var dst = Array.isArray(src) ? [] : Object.create(src.__proto__);
var dst;
if (Array.isArray(src)) {
dst = [];
}
else if (src instanceof Date) {
dst = new Date(src);
}
else if (src instanceof Boolean) {
dst = new Boolean(src);
}
else if (src instanceof Number) {
dst = new Number(src);
}
else if (src instanceof String) {
dst = new String(src);
}
else {
dst = Object.create(src.__proto__);
}
parents.push(src);

@@ -58,0 +77,0 @@ nodes.push(dst);

2

package.json
{
"name" : "traverse",
"version" : "0.3.1",
"version" : "0.3.2",
"description" : "Traverse and transform objects by visiting every node on a recursive walk",

@@ -5,0 +5,0 @@ "author" : "James Halliday",

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