New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

args-to-arr

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

args-to-arr

Arguments to array, the easy way

  • 1.3.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
70
increased by12.9%
Maintainers
1
Weekly downloads
 
Created
Source

args-to-arr

CircleCI Greenkeeper badge npm dependencies Status devDependencies Status npm type definitions codecov Known Vulnerabilities GitHub

Arguments to array, the easy way

Install

npm install args-to-arr

CDN

www.jsDelivr.com
<script src="https://cdn.jsdelivr.net/npm/args-to-arr/dist/args-to-arr.umd.js"></script>
for production
<script src="https://cdn.jsdelivr.net/npm/args-to-arr/dist/args-to-arr.umd.min.js"></script>

more options on jsDelivr website...

unpkg.com
<script src="https://unpkg.com/args-to-arr@1.3.2/dist/args-to-arr.umd.js"></script>

Usage

syntax
toArray<T>(arr: ArrayLike<T>, start: number = 0): T[];

Note that args-to-arr supports any array-like object

example
import toArray from "args-to-arr";

function anything(firstArg) {

  // convert arguments to array
  // starting from argument 1
  // it won't include firstArg
  const args = toArray(arguments, 1);

  // do something with the array

}

License

MIT © Manuel Fernández

Keywords

FAQs

Package last updated on 25 May 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc