Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

🐊Putout plugin adds ability to convert arguments to rest


Version published
Weekly downloads
16K
decreased by-13.99%
Maintainers
1
Install size
4.49 kB
Created
Weekly downloads
 

Readme

Source

@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

Keywords

FAQs

Last updated on 30 May 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc