Socket
Socket
Sign inDemoInstall

cli-command-parser

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cli-command-parser

Parse cli commands in a string intended for child_process#spawn


Version published
Weekly downloads
109
increased by118%
Maintainers
1
Install size
4.20 kB
Created
Weekly downloads
 

Readme

Source

cli-command-parser Build Status

Parses a string that is intended for child_process#spawn and returns an array with the first value being the command to execute and the rest of the array containing separated arguments.

It can handle escape sequences as well as quotes.

Install

npm install --save cli-command-parser

Usage

var cliCommandParser = require('cli-command-parser');
console.log(cliCommandParser('ls -lh'));

// outputs ['ls', '-lh']

console.log(cliCommandParser('foo "some options" --test'));

// outputs ['foo', 'some options', '--test']

Keywords

FAQs

Last updated on 14 Sep 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc