A lightweight package to obtain arguments from the environment.

Usage no npm install needed!

<script type="module">
  import ezzyArgument from 'https://cdn.skypack.dev/ezzy-argument';



Build Status Coverage Status

This small lightweight library will help fetch arguments from the environment or from the node arguments.

By requesting this library, you'll be able to invoke:

const arg = require('ezzy-argument');
arg('my_argument', 'default value');

This will look for an argument for:

  • process.env.my_argument
  • process.env.MY_ARGUMENT
  • process.argv['-MY_ARGUMENT']
  • process.argv['--MY_ARGUMENT']
  • process.argv['-my_argument']
  • process.argv['--my_argument']

and finally return the default value.

  • 'default value'