Socket
Socket
Sign inDemoInstall

rasper

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rasper

Node.js parse argument options make ease.


Version published
Weekly downloads
36
increased by100%
Maintainers
1
Install size
7.21 kB
Created
Weekly downloads
 

Readme

Source

Rasper - Node.js parse argument options make ease.

Node.js parse argument options make ease.

Travis Status AppVeyor Status Codacy Status Dependencies Status Version Status Download Status Gitter Chat

Why it's awesome

Rasper transforms command arguments into an easy-to-use formatted object. Flags will be converted into key-value. If there is define flag without value the result will be assumed to be true. Boolean-looking arguments always will be returned as booleans. Numeric-looking arguments always will be returned as numbers. _ contains all arguments that didn't have an flag associated.

Getting Started

Install with npm

$ npm install rasper

Install with Yarn

$ yarn add rasper

Run with npx (without installing)

$ npx rasper

Usage

// cli.js
const argv = require('rasper')
console.dir(argv)

// console
$ pwa-installer dist/**/*.html -f 3 -n -o 4 foo bar baz --manifest --config=pwa.config.js 2 4 -f=99
{
  _: [ 'dist/**/*.html', 'foo', 'bar', 'baz', 2, 4 ],
  n: true,
  o: 4,
  manifest: true,
  config: 'pwa.config.js',
  f: 99
}

Note: If you don't provide an argument process.argv.slice(1) is defined by default.

Contributing

Want to contribute? Follow these recommendations.

License

Designed with ♥ by CJ Patoilo. Licensed under the MIT License.

Keywords

FAQs

Last updated on 10 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc