Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
babel-plugin-closure-elimination
Advanced tools
Removes closures from your JavaScript in the name of performance.
This is a Babel plugin that eliminates unnecessary closures from your JavaScript in the name of performance.
Note: Now requires Babel 6.
Turns code like this:
function demo (input) {
return input.map(item => item + 1).map(item => item + 2);
}
Into code like this:
function _ref(item) {
return item + 1;
}
function _ref2(item) {
return item + 2;
}
function demo(input) {
return input.map(_ref).map(_ref2);
}
Because it's faster and more memory efficient in most JavaScript engines, and means you can safely use arrow functions without a performance penalty in most cases.
First, install via npm.
npm install --save-dev babel-plugin-closure-elimination
Then, in your babel configuration (usually in your .babelrc
file), add "closure-elimination"
to your list of plugins:
{
"plugins": ["closure-elimination"]
}
Published by codemix under a permissive MIT License, see LICENSE.md.
FAQs
Removes closures from your JavaScript in the name of performance.
The npm package babel-plugin-closure-elimination receives a total of 218 weekly downloads. As such, babel-plugin-closure-elimination popularity was classified as not popular.
We found that babel-plugin-closure-elimination demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.