@putout/plugin-convert-arguments-to-rest

2.0.0 • Public • Published

@putout/plugin-convert-arguments-to-rest NPM version

The rest parameter syntax allows a function to accept an indefinite number of arguments as an array, providing a way to represent variadic functions in JavaScript.

(c) MDN

🐊Putout plugin adds ability to convert arguments to rest.

Install

npm i @putout/plugin-convert-arguments-to-rest -D

Rule

{
    "rules": {
        "convert-arguments-to-rest": "on"
    }
}

Example of incorrect code

function hello() {
    console.log(arguments);
}

Example of correct code

function hello(...args) {
    console.log(args);
}

License

MIT

/@putout/plugin-convert-arguments-to-rest/

    Package Sidebar

    Install

    npm i @putout/plugin-convert-arguments-to-rest

    Weekly Downloads

    14,556

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    4.6 kB

    Total Files

    4

    Last publish

    Collaborators

    • coderaiser