Package Exports
- parse-node-args
- parse-node-args/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parse-node-args) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
parse-node-args
Utility to extract all valid node flags from a list of process args.
Install
npm install --save parse-node-argsUsage
cmd
node ./cli.js --inspect-brk --custom-optioncli.js
import { deepEqual } from "assert";
import parseNodeArgs from "parse-node-args";
const { nodeArgs, cliArgs } = parseNodeArgs(process.argv);
deepEqual(nodeArgs, ["--inspect-brk"]);
deepEqual(cliArgs, ["--custom-option"]);