Package detail

@putout/plugin-remove-iife

coderaiser52.3kMIT4.1.0

🐊Putout plugin adds ability to find and remove iife

putout, putout-plugin, putout-plugin-remove, plugin

readme

@putout/plugin-remove-iife NPM version

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:

Install

npm i @putout/plugin-remove-iife

Rule

{
    "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