@allegiant/cmdhelper

0.0.1 • Public • Published

cmdhelper

Simple command line argument parser library.

const cmdHelper = require('@allegiant/cmdhelper');
const SETTINGS = cmdHelper.process(params => {
    return {
        host: params.get('host') || '0.0.0.0',
        port: params.get('port') || 80
    };
});

SETTINGS will now hold the two properties, 'host' and 'port'. These are available to the command line as --host "hostname" and --port "port number" respectively.

Note

This is a preliminary release, api breakage may happen.

Copyright & License

Copyright © 2017 Allegiant. Distributed under the terms of the MIT License, see LICENSE

Availble via npm or github.

Readme

Keywords

none

Package Sidebar

Install

npm i @allegiant/cmdhelper

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • gabrielcsapo
  • echopoint