nv-cli-const-lit-def
v1.0.5
Published
nv-cli-const-lit-def ===================== - cli-tool - creat a simple file with many const: - input format name value name value ..... - name must be valid js-identifier - value must be String | Number | undefined | null | BigInt | JSON - its for
Downloads
2
Readme
nv-cli-const-lit-def
- cli-tool
- creat a simple file with many const:
- input format name value name value .....
- name must be valid js-identifier
- value must be String | Number | undefined | null | BigInt | JSON
- its for test nvlang's ison-def (which is used for generate many constants used for compile-time-tool)
install
- npm install nv-cli-const-lit-def -g
usage
Usage: nv_cli_const_lit_def [options]
Options:
-i, --input input string ,default stdin
-o, --output output string,default stdout
-s, --start_from_index start from , by default 1
-n, --name brief name, default "./const-lit-def.js" IF argv.o IS empty, ELSE has NO effect
-r, --reserved reserved keywords , default ["global","globalThis","window"]
-h, --help usage
example
#nv_cli_const_lit_def
//input your name value name value .... pair-list here
name0 [1n,-0,Infinity,NaN,-Infinity]
nm1 {
a:[1,2,3,"sss"]
}
name2 "looooooooooooooooooooooooooooooooooooooooong"
name3 123.45678910
nm4 1234567891011121314151617181920n
mydict { a=100 b=300}
// press ctrl+D ,will generate a simple .js for you:
--------------------------code:
const name0 = [
1n,
-0,
Infinity,
NaN,
-Infinity,
];
const nm1 = {
"a":
[
1,
2,
3,
"sss",
],
};
const name2 = "looooooooooooooooooooooooooooooooooooooooong";
const name3 = 123.4567891;
const nm4 = 1234567891011121314151617181920n;
const mydict = {
"a":
100,
"b":
300,
};
module.exports = {
name0 ,
nm1 ,
name2 ,
name3 ,
nm4 ,
mydict,
}
/*
const {
name0 ,
nm1 ,
name2 ,
name3 ,
nm4 ,
mydict,
} = require("./const-lit-def.js");
*/
LICENSE
- ISC