@putout/plugin-convert-arguments-to-rest
🐊Putout plugin adds ability to convert arguments to rest
Last updated 4 months ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (4 months ago)

11 Versions

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

Copyright 2013 - present © cnpmjs.org | Home |