Socket
Socket
Sign inDemoInstall

ast-parents

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.0 to 0.0.1

8

index.js

@@ -8,4 +8,4 @@ module.exports = addParents

function walk(node, key, parent) {
if (parent) Object.defineProperty(node, key, {
function walk(node, keyname, parent) {
if (parent) Object.defineProperty(node, keyname, {
value: parent

@@ -27,9 +27,9 @@ , configurable: true

if (child[i] && child[i].type)
walk(child[i], key, child)
walk(child[i], keyname, node)
}
} else
if (child && child.type) {
walk(child, key, node)
walk(child, keyname, node)
}
}
}
{
"name": "ast-parents",
"description": "Walks a JavaScript AST and adds a \"parent\" property to each node",
"version": "0.0.0",
"version": "0.0.1",
"main": "index.js",

@@ -6,0 +6,0 @@ "browser": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc