0.1.1 • Published 3 years ago
@hyrious/shellwords v0.1.1
@hyrious/shellwords
Ruby's stdlib shellwords porting to JS (TS).
Usage
import Shellwords from "@hyrious/shellwords"
// const Shellwords = require("@hyrious/shellwords")
Shellwords.split('here are "two words"')
// [ 'here', 'are', 'two words' ]
Shellwords.escape("It's better to give than to receive")
// "It\\'s\\ better\\ to\\ give\\ than\\ to\\ receive"
Shellwords.join(['--a=b c', '-d', 'e f'])
// '--a\\=b\\ c -d e\\ f'
Alters
Licence
MIT @ hyrious