$ cnpm install shq
Quote a string for safe use as a shell argument. Strips null characters.
This module ESM-exports one function that holds some methods:
x,Return a customized quoting function.
opt is an optional options object that supports these keys:
empty: How to represent the empty string. Default: A pair of single quotes.gratuitous: What string to put on both sides of a non-empty input that
doesn't need to be quoted.A quoting function that adds gratuitous single quotes (cf. .cfg).
see test.usage.mjs.
ISC
Copyright 2013 - present © cnpmjs.org | Home |