JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 357210
  • Score
    100M100P100Q178939F
  • License MIT

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

Package Exports

  • arrgv

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (arrgv) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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