@putout/plugin-remove-iife

4.1.0 • Public • Published

@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

/@putout/plugin-remove-iife/

    Package Sidebar

    Install

    npm i @putout/plugin-remove-iife

    Weekly Downloads

    21,896

    Version

    4.1.0

    License

    MIT

    Unpacked Size

    4.83 kB

    Total Files

    4

    Last publish

    Collaborators

    • coderaiser