📦 Table of Contents
🚀 Setup
pnpm i posixparser
🛠️ Usage
import PosixParser, {Options as PosixOptions} from 'posixparser'
const options = new Options({
pushQuotes: false,
pushEscapes: false,
pushBlankWhitespace: false,
});
const parser = new PosixParser(options); // options can also be passed as a 2nd arg to parse()
const input = `"hello world" hello hi 'hello there'`
const output = parser.parse(input);
console.log(output); // ["hello world", "hello", "hi", "hello there"]
📜 License
This project is licensed under the
🔗 See Also
-
📦 📁 @3xpo/argparser — Parse a string[] of arguments into an object