nv-cli-const-int-def

1.0.2 • Public • Published

nv-cli-const-int-def

  • cli-tool
  • creat a simple file with many const , such as:

       /*
       const aa = 1;
       const bb = 2;
        
       ....
       const xx  = 10;
       */

       module.exports = {
           aa, bb ,...,xx ,
           //// 
           1:"aa",
           2:"bb",
           ....
           10:"xx"
       }

       /*
            const {
                aa,
                bb,
                ....
                xx
            } = require("./<name>")
       */

install

  • npm install nv-cli-const-int-def -g

usage

			Usage: nv_cli_const_int_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-int-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_int_def


	one two three
	four five


	//--press ctrl+D

	--------------------------code:


	/*
	const one   = 1    ;
	const two   = 2    ;
	const three = 3    ;
	const four  = 4    ;
	const five  = 5    ;
	*/



	module.exports = {
	    "one"   : 1      ,
	    1       : "one"  ,
	    "two"   : 2      ,
	    2       : "two"  ,
	    "three" : 3      ,
	    3       : "three",
	    "four"  : 4      ,
	    4       : "four" ,
	    "five"  : 5      ,
	    5       : "five" ,
	}



	/*
	const {
	    one  ,
	    two  ,
	    three,
	    four ,
	    five ,
	} = require("./const-int-def.js");
	*/

LICENSE

  • ISC

Readme

Keywords

none

Package Sidebar

Install

npm i nv-cli-const-int-def

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

7.68 kB

Total Files

5

Last publish

Collaborators

  • ihgazni2