mkcmdargv-lib
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

Create Command Arguments (Lib)

Convert environment variables to command-line arguments

Usage

iterateCommandArguments

Creates an iterator of command arguments

const { iterateCommandArguments } = require('mkcmdargv')

console.log(...iterateCommandArguments({
  args: ['abc', 'def'],
  options: { a: 0, foo: 123 },
  flags: ['s', 'f', 'x', 'quiet', 'splash']
}))

createCommandArguments

Creates an array of command arguments

const { createCommandArguments } = require('mkcmdargv')

createCommandArguments({
  args: ['abc', 'def'],
  options: { a: 0, foo: 123 },
  flags: ['s', 'f', 'x', 'quiet', 'splash']
}).forEach(arg => console.log(arg))

License

MIT © Hoàng Văn Khải

Readme

Keywords

none

Package Sidebar

Install

npm i mkcmdargv-lib

Weekly Downloads

0

Version

0.1.5

License

MIT

Unpacked Size

7.67 kB

Total Files

6

Last publish

Collaborators

  • khai96_