Socket
Socket
Sign inDemoInstall

espurify

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

espurify - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

12

CHANGELOG.md

@@ -0,1 +1,13 @@

## [2.1.0](https://github.com/estools/espurify/releases/tag/v2.1.0) (2021-03-26)
#### Features
* [Support ES2020 grammar](https://github.com/estools/espurify/pull/21)
* support ChainExpression
* support ImportExpression
* support exported property of ExportAllDeclaration
* support BigInt literals
### [2.0.1](https://github.com/estools/espurify/releases/tag/v2.0.1) (2019-02-15)

@@ -2,0 +14,0 @@

4

index.js
/**
* espurify - Clone new AST without extra properties
* espurify - Clone AST without extra properties
*
* https://github.com/estools/espurify
*
* Copyright (c) 2014-2019 Takuto Wada
* Copyright (c) 2014-2021 Takuto Wada
* Licensed under the MIT license.

@@ -8,0 +8,0 @@ * https://github.com/estools/espurify/blob/master/MIT-LICENSE.txt

@@ -11,4 +11,5 @@ module.exports = {

BreakStatement: ['type', 'label'],
CallExpression: ['type', 'callee', 'arguments'],
CallExpression: ['type', 'callee', 'arguments', 'optional'],
CatchClause: ['type', 'param', 'guard', 'body'],
ChainExpression: ['type', 'expression'],
ClassBody: ['type', 'body'],

@@ -22,3 +23,3 @@ ClassDeclaration: ['type', 'id', 'superClass', 'body'],

EmptyStatement: ['type'],
ExportAllDeclaration: ['type', 'source'],
ExportAllDeclaration: ['type', 'source', 'exported'],
ExportDefaultDeclaration: ['type', 'declaration'],

@@ -37,8 +38,9 @@ ExportNamedDeclaration: ['type', 'declaration', 'specifiers', 'source'],

ImportDefaultSpecifier: ['type', 'local'],
ImportExpression: ['type', 'source'],
ImportNamespaceSpecifier: ['type', 'local'],
ImportSpecifier: ['type', 'imported', 'local'],
LabeledStatement: ['type', 'label', 'body'],
Literal: ['type', 'value', 'regex'],
Literal: ['type', 'value', 'regex', 'bigint'],
LogicalExpression: ['type', 'operator', 'left', 'right'],
MemberExpression: ['type', 'object', 'property', 'computed'],
MemberExpression: ['type', 'object', 'property', 'computed', 'optional'],
MetaProperty: ['type', 'meta', 'property'],

@@ -45,0 +47,0 @@ MethodDefinition: ['type', 'key', 'value', 'kind', 'computed', 'static'],

@@ -1,2 +0,2 @@

Copyright (c) 2014-2019 Takuto Wada, https://github.com/estools/espurify
Copyright (c) 2014-2021 Takuto Wada, https://github.com/estools/espurify

@@ -3,0 +3,0 @@ Permission is hereby granted, free of charge, to any person obtaining

{
"name": "espurify",
"description": "Clone new AST without extra properties",
"version": "2.0.1",
"description": "Clone AST without extra properties",
"version": "2.1.0",
"author": {

@@ -22,9 +22,9 @@ "name": "Takuto Wada",

"devDependencies": {
"acorn": "^6.0.0",
"acorn": "^8.0.0",
"babel-types": "^6.3.20",
"babylon": "^6.3.20",
"esprima": "^4.0.0",
"estraverse": "^4.1.0",
"mocha": "^5.0.0",
"semistandard": "^13.0.0",
"estraverse": "^5.0.0",
"mocha": "^8.0.0",
"semistandard": "^14.0.0",
"snazzy": "^8.0.0"

@@ -31,0 +31,0 @@ },

espurify
================================
Clone new AST without extra properties
Clone AST without extra properties
[![Build Status](https://travis-ci.org/estools/espurify.svg?branch=master)](https://travis-ci.org/estools/espurify)
[![NPM version](https://badge.fury.io/js/espurify.svg)](https://badge.fury.io/js/espurify)
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/estools/espurify/blob/master/MIT-LICENSE.txt)
[![Code Style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg)](https://github.com/Flet/semistandard)
[![Build Status][ci-image]][ci-url]
[![NPM version][npm-image]][npm-url]
[![Code Style][style-image]][style-url]
[![License][license-image]][license-url]

@@ -19,3 +19,3 @@

Leaves properties defined in [The ESTree Spec](https://github.com/estree/estree) (formerly known as [Mozilla SpiderMonkey Parser API](https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API)) only. Also note that extra informations (such as `loc`, `range` and `raw`) are eliminated too.
Leaves properties defined in [The ESTree Spec](https://github.com/estree/estree) (formerly known as [Mozilla SpiderMonkey Parser API](https://speakerdeck.com/michaelficarra/spidermonkey-parser-api-a-standard-for-structured-js-representations)) only. Also note that extra informations (such as `loc`, `range` and `raw`) are eliminated too.

@@ -30,2 +30,3 @@ #### Supported ECMAScript versions

- [ES2019](https://github.com/estree/estree/blob/master/es2019.md)
- [ES2020](https://github.com/estree/estree/blob/master/es2020.md)

@@ -258,1 +259,14 @@

Licensed under the [MIT](https://github.com/estools/espurify/blob/master/MIT-LICENSE.txt) license.
[npm-url]: https://npmjs.org/package/espurify
[npm-image]: https://badge.fury.io/js/espurify.svg
[ci-image]: https://github.com/estools/espurify/workflows/Node.js%20CI/badge.svg
[ci-url]: https://github.com/estools/espurify/actions?query=workflow%3A%22Node.js+CI%22
[style-url]: https://github.com/Flet/semistandard
[style-image]: https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg
[license-url]: https://github.com/estools/espurify/blob/master/MIT-LICENSE.txt
[license-image]: https://img.shields.io/badge/license-MIT-brightgreen.svg
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