5.0.0 β’ Published 7 months ago
@putout/plugin-remove-iife v5.0.0
@putout/plugin-remove-iife 
An IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined.
(c) MDN
πPutout plugin adds ability to find and remove IIFE. Check out in πPutout Editor:
- β
getting read of
IIFEusing Linked Template Values(__a); - β
getting read of
IIFEusing Linked Args (__args__a);
Install
npm i @putout/plugin-remove-iifeRule
{
"rules": {
"remove-iife": "on"
}
}β Example of incorrect code
(function() {
console.log('hello');
})();
((a) => fn(a))(value);
((a, b) => fn(a, b))(value, value2);β Example of correct code
console.log('hello');
fn(value);
fn(value, value2);License
MIT