nv-cli-ifel
v1.0.4
Published
nv-cli-ifel ========== - cli tool, creat many empty if-branch - simple version of nv-cli-ifelse , only one-layer NO nest;
Downloads
2
Readme
nv-cli-ifel
- cli tool, creat many empty if-branch
- simple version of nv-cli-ifelse , only one-layer NO nest;
install
- npm install nv-cli-ifel -g
usage
Usage: nv_cli_ifel [options]
Options:
-d, --discriminant discriminant
-c, --conds if(<discriminant> === <cond>)
-i, --indent indent, default 4
-m, --multi_line multiline mode, default false
-h, --help usage
example
#nv_cli_ifel -d cond -c A00 B1 C222 D EEE FF GGG
let cond = 0;
if ( cond === A00 ) { }
else if ( cond === B1 ) { }
else if ( cond === C222 ) { }
else if ( cond === D ) { }
else if ( cond === EEE ) { }
else if ( cond === FF ) { }
else if ( cond === GGG ) { }
else {
}
#nv_cli_ifel -m -d cond -c A00 B1 C222 D EEE FF GGG
let cond = 0;
if ( cond === A00 ) {
} else if ( cond === B1 ) {
} else if ( cond === C222 ) {
} else if ( cond === D ) {
} else if ( cond === EEE ) {
} else if ( cond === FF ) {
} else if ( cond === GGG ) {
} else {
}
LICENSE
- ISC