Skip to content

dipo1/node-simple-args

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-simple-args

Provide easy way to get node arguments

Usage

CLI (node script.js -u root -p Qwerty123$ or node script.js --username root --password Qwerty123$)

//script.js
import {get} from simple-nod-args

const u = get('u');
const p = get('p');
const username = get('username');
const password = get('password');

console.log(u, p, username, password);
//root Qwerty123$ root Qwerty123$

Browser (URL?username=root&password=Qwerty123$)

import {getParam} from simple-nod-args

const username = getParam('username');
const password = getParam('password');

console.log(username, password);
//root Qwerty123$

About

Provide easy way to get node arguments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published