codeql-action/node_modules/arrgv
github-actions[bot] 0da815296a Update checked-in dependencies 2022-02-24 17:03:29 +00:00
..
.editorconfig replace jest with ava 2020-05-13 11:13:27 +01:00
.eslintrc replace jest with ava 2020-05-13 11:13:27 +01:00
.travis.yml replace jest with ava 2020-05-13 11:13:27 +01:00
LICENSE replace jest with ava 2020-05-13 11:13:27 +01:00
README.md replace jest with ava 2020-05-13 11:13:27 +01:00
index.js replace jest with ava 2020-05-13 11:13:27 +01:00
package.json Update checked-in dependencies 2022-02-24 17:03:29 +00:00
test.js replace jest with ava 2020-05-13 11:13:27 +01:00

README.md

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