Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

string-argv

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-argv

string-argv parses a string into an argument array to mimic process.argv. This is useful when testing Command Line Utilities that you want to pass arguments to.

  • 0.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14M
increased by10.19%
Maintainers
2
Weekly downloads
 
Created

What is string-argv?

The string-argv npm package is used to parse string representations of command-line arguments into an array format, similar to how the arguments would be received in a Node.js script when running from the command line. It can handle quoted arguments, escaped characters, and supports both single and double quotes.

What are string-argv's main functionalities?

Parsing command-line argument strings

This feature allows you to convert a string that represents command-line arguments into an array of arguments, as they would appear in process.argv in a Node.js application.

const parseArgs = require('string-argv');
const args = parseArgs('node app.js --option=value "argument with spaces"');
console.log(args);

Other packages similar to string-argv

Keywords

FAQs

Package last updated on 01 May 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc