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

acorn-6to5

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn-6to5 - npm Package Compare versions

Comparing version 0.11.1-16 to 0.11.1-17

2

package.json

@@ -5,3 +5,3 @@ {

"main": "acorn_csp.js",
"version": "0.11.1-16",
"version": "0.11.1-17",
"maintainers": [

@@ -8,0 +8,0 @@ {

@@ -200,3 +200,5 @@ if (typeof exports != "undefined") {

testFail("obj ?= 2;", "You can only use member expressions in memoization assignment (1:0)");
testFail("obj ?= 2;", "You can only use member expressions in memoization assignment (1:0)", {
playground: true
});

@@ -247,2 +249,79 @@ test("obj.x ?= 2;", {

test("x ||= 2;", {
type: "Program",
start: 0,
end: 8,
body: [{
type: "ExpressionStatement",
start: 0,
end: 8,
expression: {
type: "AssignmentExpression",
start: 0,
end: 7,
left: {
type: "Identifier",
start: 0,
end: 1
},
right: {
type: "Literal",
start: 6,
end: 7,
value: 2,
raw: "2"
},
operator: "||="
}
}]
}, {
playground: true
});
test("obj.x ||= 2;", {
type: "Program",
start: 0,
end: 12,
body: [{
type: "ExpressionStatement",
start: 0,
end: 12,
expression: {
type: "AssignmentExpression",
start: 0,
end: 11,
left: {
type: "MemberExpression",
start: 0,
end: 5,
object: {
type: "Identifier",
start: 0,
end: 3,
name: "obj"
},
property: {
type: "Identifier",
start: 4,
end: 5,
name: "x"
},
computed: false
},
right: {
type: "Literal",
start: 10,
end: 11,
value: 2,
raw: "2"
},
operator: "||="
}
}]
}, {
playground: true
});
// Method binding

@@ -249,0 +328,0 @@

@@ -83,2 +83,128 @@ if (typeof exports != "undefined") {

test("2 ** (3 ** 2)", {
type: "Program",
body: [{
type: "ExpressionStatement",
expression: {
type: "BinaryExpression",
left: {
type: "Literal",
value: 2
},
operator: "**",
right: {
type: "BinaryExpression",
left: {
type: "Literal",
value: 3
},
operator: "**",
right: {
type: "Literal",
value: 2
}
}
}
}]
}, {
ecmaVersion: 7
});
test("2 ** 3 ** 2", {
type: "Program",
body: [{
type: "ExpressionStatement",
expression: {
type: "BinaryExpression",
left: {
type: "Literal",
value: 2
},
operator: "**",
right: {
type: "BinaryExpression",
left: {
type: "Literal",
value: 3
},
operator: "**",
right: {
type: "Literal",
value: 2
}
}
}
}]
}, {
ecmaVersion: 7
});
test("(2 ** -1) * 2", {
type: "Program",
body: [{
type: "ExpressionStatement",
expression: {
type: "BinaryExpression",
left: {
type: "BinaryExpression",
left: {
type: "Literal",
value: 2
},
operator: "**",
right: {
type: "UnaryExpression",
operator: "-",
prefix: true,
argument: {
type: "Literal",
value: 1
}
}
},
operator: "*",
right: {
type: "Literal",
value: 2
}
}
}]
}, {
ecmaVersion: 7
});
test("2 ** -1 * 2", {
type: "Program",
body: [{
type: "ExpressionStatement",
expression: {
type: "BinaryExpression",
left: {
type: "BinaryExpression",
left: {
type: "Literal",
value: 2
},
operator: "**",
right: {
type: "UnaryExpression",
operator: "-",
prefix: true,
argument: {
type: "Literal",
value: 1
}
}
},
operator: "*",
right: {
type: "Literal",
value: 2
}
}
}]
}, {
ecmaVersion: 7
});
// ES7: Object Rest/Spread

@@ -85,0 +211,0 @@

Sorry, the diff of this file is not supported yet

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