argument-vector

Split a string of command line options into and argv(argument vector) array

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
argument-vector
001.0.27 years ago7 years agoMinified + gzip package size for argument-vector in KB

Readme

argument-vector
Build Status
Split a string of command line options into and argv(argument vector) array.
This is perticularly handy for passing arguments to require('childprocess').spawn

Install

$ npm install argument-vector --save

Usage

var parser = require('argument-vector')();
var argv = parser.parse('curl http://example.com --keepalive-time 5 --cookie msg="String with spaces" -XPOST');
//=> ['curl', 'http://example.com', '--keepalive-time', '5', '--cookie', 'msg="String with spaces"', '-XPOST']

License

MIT © Colin Milhench