
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Support many ES6 features with no runtime requirements. Sometimes this results in more code, but it provides a much cleaner build system. Things like Map
, Set
, Symbol
etc. must be polyfilled separately if you wish to use them. This module only aims to provide syntax extensions.
npm install acorn-es6
var compile = require('acorn-es6');
var compiled = compile('var log = msg => console.log(msg);');
// => "var log = function (msg) { console.log(msg); };"
You can also use it as a browserify transform by specifying the transform as acorn-es6/browserify
.
var log = msg => console.log(msg);
function logDeveloper(name, codes = 'JavaScript', livesIn = 'USA') {
console.log('name: %s, codes: %s, lives in: %s', name, codes, livesIn);
}
for (var element of [1, 2, 3]) {
console.log('element:', element);
}
var object = {
prop: 42,
// No need for function
method() {
return this.prop;
}
};
var x = 5, y = 10;
console.log(`${x} + ${y} = ${ x + y}`);
// 5 + 10 = 15
function printList(listname, ...items) {
console.log('list %s has the following items', listname);
items.forEach(function (item) { console.log(item); });
}
function add(x, y) {
console.log('%d + %d = %d', x, y, x + y);
}
var numbers = [5, 10]
add(...numbers);
// 5 + 10 = 15
MIT
FAQs
Support many ES6 features with no runtime requirements
The npm package acorn-es6 receives a total of 0 weekly downloads. As such, acorn-es6 popularity was classified as not popular.
We found that acorn-es6 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.