parse-command
TypeScript icon, indicating that this package has built-in type declarations

0.0.102 • Public • Published

Parse a command using bash/OS

Installation

 $ npm i parse-command 

Usage

const {parseCommand} = require('parse-command');

parseCommand('--foo=5 --bar="/a file/path" --zoom -z', function(err, val){
   // val is parsed array
   // val => [ '--foo=5', '--bar=/a file/path', '--zoom', '-z' ]
});

// using promises
const {parseCommandp} = require('parse-command');

parseCommandp('--foo=5 --bar="/a file/path" --zoom -z').then(function(val){
   // val is parsed array
   // val => [ '--foo=5', '--bar=/a file/path', '--zoom', '-z' ]
});

Package Sidebar

Install

npm i parse-command

Weekly Downloads

0

Version

0.0.102

License

SEE LICENSE IN LICENSE.md

Unpacked Size

5.69 kB

Total Files

11

Last publish

Collaborators

  • oresoftware