pnpm i posixparser
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"]
This project is licensed under the 📄 MIT License
- 📦 📁 @3xpo/argparser — Parse a string[] of arguments into an object