json-table-format

1.0.0-rc.3 • Public • Published

json-table-format

Goals

given this input

{ 
    "firstName": {
        "type": "string",
        "description": "The person's first name."
    },
    "lastName": {
        "type": "string",
        "description": "The person's last name."
    },
    "age": {
        "description": "Age in years which must be equal to or greater than zero.",
        "type": "integer",
        "minimum": 0
    }
}

produce this output

{ 
    "firstName": { "type": "string",  "description": "The person's first name." },
    "lastName":  { "type": "string",  "description": "The person's last name." },
    "age":       { "type": "integer", "description": "Age in years which must be equal to or greater than zero.", "minimum": 0 }
}

Usage

First, install:

npm install -g json-table-format

Second, use:

# prints to STDOUT by default
json-table-format ./path/to/file.json

# or you can format the file in-place
json-table-format ./path/to/file.json --overwrite

References

/json-table-format/

    Package Sidebar

    Install

    npm i json-table-format

    Weekly Downloads

    0

    Version

    1.0.0-rc.3

    License

    MIT

    Unpacked Size

    22.3 kB

    Total Files

    6

    Last publish

    Collaborators

    • dunstontc