@putout/plugin-convert-arguments-to-rest
🐊Putout plugin adds ability to convert arguments to rest
Last updated a year ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/plugin-convert-arguments-to-rest 
SYNC missed versions from official npm registry.

@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. Merged with @putout/plugin-arguments.

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

Current Tags

  • 4.0.1                                ...           latest (a year ago)

11 Versions

  • 4.0.1                                ...           a year ago
  • 4.0.0                                ...           a year ago
  • 3.1.0                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.0.0                                ...           3 years ago
  • 1.3.0                                ...           6 years ago
  • 1.2.0                                ...           7 years ago
  • 1.1.0                                ...           7 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 14
Today 0
This Week 0
This Month 14
Last Day 0
Last Week 5
Last Month 0
Dependencies (0)
None
Dev Dependencies (7)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE