Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 1.45 KB

README.md

File metadata and controls

53 lines (38 loc) · 1.45 KB

@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