1.0.3 • Published 3 years ago

nv-cli-path v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

nv-cli-path

  • nv-cli-path
  • simple cli tool, dict-to-paths OR paths-to-dict

install

  • npm install nv-cli-path -g

usage

      Usage: nv_cli_path [options] <file>
      If <file> is not provided, then STDIN is used.
      Options:
        -c, --config [file]      config default see below
        -w, --withinfo           with info
        -e, --encoding           default utf8
        -o, --output [file]      Output to the specified file, otherwise STDOUT
        -h, --help               Output usage information


    ---default config---
    {
      quotes: [ '"', "'", '`' ],
      colons: [ ':', '=' ],
      commas: [ ',', ';' ],
      array_blks: [ [ '[', ']' ], [ '(', ')' ], [ '<', '>' ] ],
      obj_blks: [ [ '{', '}' ] ]
    }
    ---default config---

example

        nv-cli-path# nv_cli_path

        /a/b/c
        /a/b/d
       
        //---------------press ctrl+D


        {
            "a": {
                "b": {
                    "c": null,
                    "d": null
                }
            }
        }
        nv-cli-path# nv_cli_path -w

        /a/b/c
        /a/b/d

        //---------------press ctrl+D


        {
            "a": {
                "b": {
                    "c": "/a/b/c",
                    "d": "/a/b/d"
                }
            }
        }
        nv-cli-path#

        nv-cli-path# nv_cli_path
        {
            "a": {
                "b": {
                    "c": null,
                    "d": null
                }
            }
        }

        //---------------press ctrl+D


        /a/b/c
        /a/b/d


        nv-cli-path#
        nv-cli-path# nv_cli_path -w

        {
            "a": {
                "b": {
                    "c": "/a/b/c",
                    "d": "/a/b/d"
                }
            }
        }
         
        //---------------press ctrl+D 

        /a/b/c
        /a/b/d

LICENSE

  • ISC