You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@adlib/shell-quote

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@adlib/shell-quote

Quote an args array into a quoted shell command string.

1.0.1
unpublished
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@adlib/shell-quote

Create a "shell-like" quoted command string from an args array. Double quotes are used when possible, and backslash escapes when necessary.

This is mostly intended for pretty printing commands executed from inside a NodeJS script. But, it should generate command strings safe to cut and paste into a sh, bash, or zsh prompt.

Usage

import { quote } from '@adlib/shell-quote';

const command = quote(['npm', 'i', 'react@^17']);
// npm i "react@^17"

FAQs

Package last updated on 06 Nov 2021

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