Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Parsing and quoting for shell command lines that supports both bash and windows styles of quoting.
A simple set of functions for parsing a command line string into arguments and converting command line arguments into a correctly escaped string.
Many other npm modules offer this functionality however the only ones I could find only support unix style escaping and so do not work correctly for windows command lines.
This module exports bashShellParse
, winShellParse
, bashShellQuote
and winShellQuote
. It
also exports shellQuote
and shellParse
which call the function correct for the current platform.
The parse functions accept a string and return an array of strings:
import { bashShellQuote } from "shell-args";
bashShellParse("hello there world"); // -> ["hello", "there", "world"]
bashShellParse("\"hello there\" world"); // -> ["hello there", "world"]
bashShellParse(`foo
test\\(\\)`); // -> ["foo", "test()"]
The quote functions accept an array of strings and return a string:
import { bashShellParse } from "shell-args";
bashShellQuote(["hello", "there", "world"]); // -> "hello there world"
bashShellQuote(["hello there", "world"]); // -> "\"hello there\" world"
bashShellQuote(["foo", "test()"]); // -> ["foo", "test\\(\\)"]
FAQs
Parsing and quoting for shell command lines that supports both bash and windows styles of quoting.
We found that shell-args demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.