@putout/plugin-convert-apply-to-spread

4.0.0 • Public • Published

@putout/plugin-convert-apply-to-spread NPM version

Spread syntax (...) allows an array expression to be expanded in places where zero or more arguments are expected.

(c) MDN

🐊Putout plugin adds ability to convert apply to spread.

Install

npm i @putout/plugin-convert-apply-to-spread -D

Rule

{
    "rules": {
        "convert-apply-to-spread": "on"
    }
}

Example of incorrect code

console.apply(null, arguments);

Example of correct code

console.log(...arguments);

License

MIT

/@putout/plugin-convert-apply-to-spread/

    Package Sidebar

    Install

    npm i @putout/plugin-convert-apply-to-spread

    Weekly Downloads

    12,704

    Version

    4.0.0

    License

    MIT

    Unpacked Size

    3.61 kB

    Total Files

    4

    Last publish

    Collaborators

    • coderaiser