posixparser
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

PosixParser

📝 Documentation 📦 NPM 🧪 Tests

Parse Posix-Style Arguments in JS - Rewrite of this old gist of mine

📦 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 📄 MIT License

🔗 See Also

Dependencies (0)

    Dev Dependencies (12)

    Package Sidebar

    Install

    npm i posixparser

    Weekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    13.5 kB

    Total Files

    13

    Last publish

    Collaborators

    • exponentialworkload