npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nv-cli-ifif

v1.0.4

Published

nv-cli-ifif =========== - cli tool - create a simple project ONLY USING if/else WITHIN a top-while-loop

Downloads

2

Readme

nv-cli-ifif

  • cli tool

  • create a simple project ONLY USING if/else WITHIN a top-while-loop

  • this is a simple version of 【nv-cli-many-block】 + 【nv-cli-state】 + 【nv-cli-ifelse】

  • only support 2 layers

  • only generate sync functions

  • without using parser, just concat string

  • suitable for small-scale(not-many-if-branch). if many if-branch(hundred * hundred: nv-cli-state is suitable

  • nvlang has a ctx-dsl, it convert most code to while + if/else + a-matrix , this pkg for test it.

install

  • npm install nv-cli-ifif -g

usage

          #mkdir WORKDIR

0. nv_cli_ifif_cfg

	Usage: nv_cli_ifif_cfg [options] 
	Options:
	    -w, --workdir        workdir , default "./"
	    -h, --help           usage

	total 8
	-rwxrwxrwx 1 root root 38 Jul  3 17:18 input.def
	-rwxrwxrwx 1 root root 29 Jul  3 17:18 state.def
                                                   ___cfg___.js

1. EDIT input.def AND state.def CREATED BY nv_cli_ifif_cfg

           input.def 
                name name name .....
           state.def
                name name name ....


       0. names must be unique (across two files)
       1. names must be valid js-identifier
       2. names must be lower-case
       3. names CANT BE [
	    "run","main",
	    "prepare","init","while","final",
	    "creat_ctx",
	    "calc_input_hash",
	    "ctx", "state","input","input_hash",
	    "i","j","k",
	    "error",
	    "finish"                        
       ]

2. RUN nv_cli_ifif_creat IN the-same DIR

		Usage: nv_cli_ifif_creat [options] 
		Options:
		    -w, --workdir        workdir , default "./"
		    -h, --help           usage

		WORKDIR# ls -l
		total 40
		-rw-r--r-- 1 root root  226 Jul  3 17:39 ctx.js
		-rw-r--r-- 1 root root  504 Jul  3 17:39 final.lexical.js
		-rw-r--r-- 1 root root  237 Jul  3 17:39 init.lexical.js
		-rwxrwxrwx 1 root root   38 Jul  3 17:39 input.def
		-rw-r--r-- 1 root root  842 Jul  3 17:39 input-def.js
		-rw-r--r-- 1 root root  402 Jul  3 17:39 input-hash-func.js
		-rw-r--r-- 1 root root  192 Jul  3 17:39 prepare.lexical.js
		-rwxrwxrwx 1 root root   29 Jul  3 17:39 state.def
		-rw-r--r-- 1 root root  467 Jul  3 17:39 state-def.js
		drwxr-xr-x 7 root root 4096 Jul  3 17:39 while
                                                             ___cfg___.js

3. EDIT the following files

      0. you can choose to EDIT the following empty files:
         ./input-hash-func.js
         ./ctx.js
         ./prepare.js
         ./init.js

      1. #tree ./while
         check the files and EDIT them

      2. AFTER THAT, you can also choose to EDIT the following empty files:
         ./final.js

4. RUN nv_cli_ifif_make IN the-same DIR. IT will CREAT a ./index.js

			WORKDIR# ls -l | egrep index
			-rw-r--r-- 1 root root 8823 Jul  3 17:40 index.js

others:

clean

        your can use #nv_cli_ifif_clean to remove all the-lecical-files:
            prepare.lexical.js
            init.lexical.js
            </while>
            final.lexical.js

			WORKDIR# ls -l
			total 20
                                                                     ctx.js
                                                                     input-hash-func.js
			-rw-r--r-- 1 root root 8823 Jul  3 17:40 index.js
			-rwxrwxrwx 1 root root   38 Jul  3 17:39 input.def
			-rwxrwxrwx 1 root root   29 Jul  3 17:39 state.def
                                                                     ___cfg___.js

recover

        your can also use #nv_cli_ifif_recover  to recover these files 

example

LICENSE

  • ISC