Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.