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

abstract-syntax-tree

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-syntax-tree - npm Package Compare versions

Comparing version 2.15.0 to 2.15.1

src/iife.js

4

CHANGELOG.md
# abstract-syntax-tree changelog
## 2.15.1
* add: iife method (static)
## 2.15.0

@@ -4,0 +8,0 @@

@@ -23,2 +23,3 @@ const find = require('./src/find')

const program = require('./src/program')
const iife = require('./src/iife')

@@ -106,2 +107,6 @@ class AbstractSyntaxTree {

static iife (body) {
return iife(body)
}
constructor (source = '', options = {}) {

@@ -108,0 +113,0 @@ if (typeof source === 'string') {

2

package.json
{
"name": "abstract-syntax-tree",
"version": "2.15.0",
"version": "2.15.1",
"description": "abstract syntax tree",

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

@@ -14,2 +14,3 @@ # abstract-syntax-tree

- [REPL](https://buxlabs.pl/en/tools/js/ast)
- [Nodes](#nodes)
- [Optimizations](#optimizations)

@@ -376,2 +377,12 @@ - [Maintainers](#maintainers)

#### iife
Creates an abstract syntax tree for an immediately invoked function expression.
```js
const { iife } = require('abstract-syntax-tree')
const node = iife() // { type: 'ExpressionStatement', expression: { ... } }
```
### Instance Methods

@@ -472,2 +483,95 @@

## Nodes
| Type | Example |
|--------------------------|:---------------------------------:|
| ArrayExpression | `const foo = []` |
| ArrayPattern | `const [foo, bar] = bar` |
| AssignmentExpression | `foo = bar` |
| AssignmentOperator | |
| AssignmentPattern | `function foo(bar = baz) {} ` |
| AwaitExpression | `(async () => { await foo() })()` |
| BigIntLiteral | |
| BinaryExpression | `foo + bar` |
| BinaryOperator | |
| BlockStatement | `{ console.log(foo) }` |
| BreakStatement | `for (foo in bar) break` |
| CallExpression | |
| CatchClause | |
| ChainElement | |
| ChainExpression | |
| Class | |
| ClassBody | |
| ClassDeclaration | |
| ClassExpression | |
| ConditionalExpression | |
| ContinueStatement | |
| DebuggerStatement | |
| Declaration | |
| Directive | |
| DoWhileStatement | |
| EmptyStatement | |
| ExportAllDeclaration | |
| ExportDefaultDeclaration | |
| ExportNamedDeclaration | |
| ExportSpecifier | |
| Expression | |
| ExpressionStatement | |
| ForInStatement | |
| ForOfStatement | |
| ForStatement | |
| Function | |
| FunctionBody | |
| FunctionDeclaration | |
| FunctionExpression | |
| Identifier | |
| IfStatement | |
| ImportDeclaration | |
| ImportDefaultSpecifier | |
| ImportExpression | |
| ImportNamespaceSpecifier | |
| ImportSpecifier | |
| LabeledStatement | |
| Literal | |
| LogicalExpression | |
| LogicalOperator | |
| MemberExpression | |
| MetaProperty | |
| MethodDefinition | |
| ModuleDeclaration | |
| ModuleSpecifier | |
| NewExpression | |
| Node | |
| ObjectExpression | |
| ObjectPattern | |
| Pattern | |
| Position | |
| Program | |
| Property | |
| RegExpLiteral | |
| RestElement | |
| ReturnStatement | |
| SequenceExpression | |
| SourceLocation | |
| SpreadElement | |
| Statement | |
| Super | |
| SwitchCase | |
| SwitchStatement | |
| TaggedTemplateExpression | |
| TemplateElement | |
| TemplateLiteral | |
| ThisExpression | |
| ThrowStatement | |
| TryStatement | |
| UnaryExpression | |
| UnaryOperator | |
| UpdateExpression | |
| UpdateOperator | |
| VariableDeclaration | |
| VariableDeclarator | |
| WhileStatement | |
| WithStatement | |
| YieldExpression | |
## Optimizations

@@ -474,0 +578,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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