argv-utils
v1.0.2
Published
The `argv-utils` package is a lightweight library for Node.js that simplifies working with command-line arguments passed to your scripts. It streamlines the process of accessing and managing arguments from `process.argv` property.
Downloads
47
Maintainers
Readme
argv Utils
The argv-utils
package is a lightweight library for Node.js that simplifies working with command-line arguments passed to your scripts. It streamlines the process of accessing and managing arguments from process.argv
property.
Getting Started
Install the package:
$ npm install -D argv-utils
Manage your arguments with ease:
$ node my-script.js --one --two="Hello World!" --someValue="false"
// my-script.js
import { argv } from 'node:process';
import { parseArgs } from 'argv-utils';
parseArgs(argv);
// {
// execPath: '/usr/local/bin/node',
// scriptPath: '/path/to/my-script.js',
// one: 'true',
// two: 'Hello World!',
// someValue: 'false',
// }
Built With
- JavaScript / TypeScript
Running the Tests
$ npm run test:unit
License
Acknowledgments
- ...
@TODOS
- [ ] ...
Deployment
Install dependencies:
$ npm install
Build the library:
$ npm start
Publish to npm
:
$ npm publish