Socket
Socket
Sign inDemoInstall

parse-spawn-args

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    parse-spawn-args

parse string to spawn recognized arguments list


Version published
Maintainers
1
Install size
31.5 kB
Created

Readme

Source

parse-spawn-args

If you need to spawn child process in Node.js, and need to parse a string command to a list arguments that pass to child process, this module will be helpful. Here is examples:

usage

parse args with quote around

var parse = require('parse-spawn-args').parse
parse('-port 80 --title "this is a title"')
/*
    [
        '-port',
        '80',
        '--title',
        'this is a title'
    ]
/*

parse args with quote escape

var parse = require('parse-spawn-args').parse
parse('-port 80 --title "this is a \\"title\\"')
/*
    [
        '-port',
        '80',
        '--title',
        'this is a "title"'
    ]
*/

Keywords

FAQs

Last updated on 09 Jul 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