New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

flast

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flast - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"name": "flast",
"version": "1.1.0",
"version": "1.1.1",
"description": "Flatten JS AST",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -191,2 +191,4 @@ # flAST - FLat Abstract Syntax Tree

## Changes
### v1.1.1
- Improve getParentKey to include parsing the name of grouped nodes such as 'arguments' or 'body'.
### v1.1.0

@@ -193,0 +195,0 @@ - Added parentKey property.

@@ -43,2 +43,7 @@ // noinspection JSUnusedGlobalSymbols

if (parent[key]?.nodeId === targetChildNodeId) return key;
else if (Array.isArray(parent[key])) {
for (const item of parent[key]) {
if (item.nodeId === targetChildNodeId) return key;
}
}
}

@@ -45,0 +50,0 @@ }

@@ -67,3 +67,3 @@ const assert = require('assert');

{nodeId: 0, type: 'Program', start: 0, end: 3, src: 'a=3', parentNode: null, parentKey: null},
{nodeId: 1, type: 'ExpressionStatement', start: 0, end: 3, src: 'a=3', parentKey: null},
{nodeId: 1, type: 'ExpressionStatement', start: 0, end: 3, src: 'a=3', parentKey: 'body'},
{nodeId: 2, type: 'AssignmentExpression', start: 0, end: 3, src: 'a=3', operator: '=', parentKey: 'expression'},

@@ -70,0 +70,0 @@ {nodeId: 3, type: 'Identifier', start: 0, end: 1, src: 'a', parentKey: 'left'},

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