# nv-cli-expt-strlit

> cli tool, export string-literal in js/ts/json of a dir

Latest version **1.0.0** (published 2022-11-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install nv-cli-expt-strlit
pnpm add nv-cli-expt-strlit
yarn add nv-cli-expt-strlit
bun add nv-cli-expt-strlit
```

Provides the command `nv_cli_expt_strlit`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-11-18 |
| First published | 2022-11-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ihgazni2 |

## Links

- npm: https://www.npmjs.com/package/nv-cli-expt-strlit
- npm.io page: https://npm.io/package/nv-cli-expt-strlit

## Dependencies (5)

- [nv-js-parse](https://npm.io/package/nv-js-parse.md) ^1.3.21
- [nv-cli-basic](https://npm.io/package/nv-cli-basic.md) ^1.0.5
- [nv-path-basic](https://npm.io/package/nv-path-basic.md) ^1.0.3
- [nv-file-reader](https://npm.io/package/nv-file-reader.md) ^1.0.7
- [nv-facutil-simple-log](https://npm.io/package/nv-facutil-simple-log.md) ^1.0.1

## Recent versions

- 1.0.0 (latest) — 2022-11-18
- 0.0.9 — 2022-11-12

## README

nv-cli-expt-strlit
=====================
- cli-tool   
- expt all strlit  in js/ts/json  of a dir
- for paramiterize a project (hoist all literal)
- the fixed string(normally irregulable AND not well-defined) of a project is boring when do automation-generate

install
=======
- npm install nv-cli-expt-strlit -g 

usage
=====


        Usage: nv_cli_expt_strlit [options]
        Options:
            -p, --path            path to search ,default ./
            -m, --max_size        estimated max_size of ast-nodes ,default 20000
            -u, --suffixes        default js ts json
            -h, --help            usage


    
example
-------

####        for example, find all string in nodejs/lib source code  

            nv_cli_expt_strlit -p "../node/lib"
####
 
            will generate 3 files:
                    root@dev:/opt/JS/nd18/WORK# ls -l | egrep str
                    -rw-r--r--   1 root root  104712 Nov 12 10:22 str.brief.json
                    -rw-r--r--   1 root root 1133599 Nov 12 10:22 str.pas.json
                    -rw-r--r--   1 root root 1919232 Nov 12 10:22 str.tbl.json
                    root@dev:/opt/JS/nd18/WORK#       
  
### brief  is a array of string

          ......

          "timers._unrefActive() is deprecated.",
          "timers.active() is deprecated. Please use timeout.refresh() instead.",
          "timers.enroll() is deprecated. Please use setTimeout instead.",
          "timers.unenroll() is deprecated. Please use clearTimeout instead.",
          "timers/promises",
          "tis-620",
          "tls",
          "tls.TLSSocket instead.",
          "tls.createSecurePair() is deprecated. Please use ",
          "tlsClientError",
          "tls_wrap",
          "to",
          "to '",
          "to use the '.cjs' file extension.",
          "toASCII",
          "toString",
          "toUnicode",
          "traceDeprecation",
          "traceProcessWarnings",
          "trailer",
          "trailer content",
          "trailers",
          "transfer-encoding",
          "transform.readable",
          "transform.writable",
          "transformSource",
          "transformer.readableType",
          "transformer.writableType",  
          .....               
  
  
### pas  is a dict 
  
       {
           【<file-path> : {
               【<ast-path> : String】 +
           }】 +
           
       }


          "/opt/JS/nd18/lib/_http_outgoing.js": {
            "body/1/declarations/0/init/arguments/0": "internal/streams/state",
            "body/2/declarations/0/init/arguments/0": "internal/assert",
            "body/3/declarations/0/init/arguments/0": "events",
            "body/4/declarations/0/init/arguments/0": "stream",
            "body/5/declarations/0/init/arguments/0": "internal/util",
            "body/6/declarations/0/init/arguments/0": "internal/http",
            "body/7/declarations/0/init/arguments/0": "buffer",
            "body/8/declarations/0/init/arguments/0": "_http_common",
            "body/9/declarations/0/init/arguments/0": "internal/async_hooks",
            "body/10/declarations/0/init/arguments/0": "internal/errors",
            "body/11/declarations/0/init/arguments/0": "internal/validators",
            "body/12/declarations/0/init/arguments/0": "internal/util/types",
            "body/13/declarations/0/init/callee/object/arguments/0": "internal/util/debuglog",
            "body/13/declarations/0/init/arguments/0": "http",
            "body/15/declarations/0/init/arguments/0": "corked",
            "body/18/body/body/0/argument/right/right": "cookie",
           ....
          }

### tbl  is  a array of 3-tuple 

          Array<[path,ast-path,String]> 
            ...
              [
                "/opt/JS/nd18/lib/internal/modules/esm/translators.js",
                "body/36/expression/arguments/1/body/body/0/expression/arguments/0",
                "Importing JSON modules"
              ],
              [
                "/opt/JS/nd18/lib/internal/modules/esm/translators.js",
                "body/36/expression/arguments/1/body/body/1/expression/arguments/2",
                "load"
              ],
              [
                "/opt/JS/nd18/lib/internal/modules/esm/translators.js",
                "body/36/expression/arguments/1/body/body/3/declarations/0/init/test/arguments/1",
                "file:"
              ],
            ...

LICENSE
=======
- ISC

---
_Source: https://npm.io/package/nv-cli-expt-strlit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
