Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

argument-vector

cmilhench13kMIT1.0.2

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

argv, parser, argument-vector, split, quote, quoted-value, spawn

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('child_process').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