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

1.0.2 • Public • Published

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

MIT


Acknowledgments

  • ...

@TODOS

  • [ ] ...

Deployment

Install dependencies:

$ npm install

Build the library:

$ npm start

Publish to npm:

$ npm publish

/argv-utils/

    Package Sidebar

    Install

    npm i argv-utils

    Weekly Downloads

    15

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    7.96 kB

    Total Files

    13

    Last publish

    Collaborators

    • jesusgraterol