$ cnpm install @putout/plugin-convert-arguments-to-rest
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.
npm i @putout/plugin-convert-arguments-to-rest -D
{
"rules": {
"convert-arguments-to-rest": "on"
}
}
function hello() {
console.log(arguments);
}
function hello(...args) {
console.log(args);
}
MIT
Copyright 2013 - present © cnpmjs.org | Home |