arrgv
Parsing string to array of args like node on bash do.
Last updated 6 years ago by astur .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install arrgv 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.2                                ...           latest (5 years ago)

9 Versions

  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.0.6                                ...           9 years ago
  • 0.0.5                                ...           9 years ago
  • 0.0.4                                ...           9 years ago
  • 0.0.3                                ...           9 years ago
  • 0.0.2                                ...           9 years ago
  • 0.0.1                                ...           9 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (4)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE