Socket
Socket
Sign inDemoInstall

arrgv

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

arrgv

Parsing string to array of args like node on bash do.


Version published
Maintainers
1
Weekly downloads
227,888
increased by8.08%
Install size
9.74 kB

Weekly downloads

Readme

Source

Arrgv

Parsing string to array of args like node on bash do.

Build Status NPM version

When you type something like node script.js bla bla bla in shell and do myArgs = process.argv.slice(2) you get the same. All slashes, quotes and special symbols are handled same way.

Install

npm install arrgv

Tests

$ npm test

Use cases

  1. spawn a command that is given as a string
  2. test argv parser with complicated example string
  3. something else

Example

var arrgv = require('arrgv');
var str = '-param --format="hh:mm:ss" filename.ext';
console.log(arrgv(str));
/*
['-param',
 '--format=hh:mm:ss',
 'filename.ext' ]
*/

License

MIT

Keywords

FAQs

Last updated on 12 Nov 2019

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