0.0.6 • Published 7 years ago

line-list-to-json v0.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

line-list-to-json

CLI for turning a line separated list to a JSON array

Installation

npm i -g line-list-to-json

Usage

InFile.txt

some list
separated
by many lines

that was a blank one

Command Line:

lljson relative/path/to/InFile.txt relative/path/to/OutFile

OutFile.json:

[
    "some list",
    "separated",
    "by many lines",
    "",
    "that was a blank one"
]

Optional params

No Blank

Ignore blank lines.

[-b, --no-blank]

Overwrite

Overwrite the outFile if it already exists.

[-o, --overwrite]

Pretty

Pretty print JSON. Assign value for spacing.

[-p, --pretty=2]

Sorting

Ascending

Sort list ascending.

[-a, --sort-ascending]

Descending

Sort list descending.

[-d, --sort-descending]

Unique

Only keep unique lines.

[-u, --unique]
0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago