1.1.6 • Published 3 years ago

@hovrcat/reorder-json v1.1.6

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

Reorder JSON

Small tool that reorders JSON keys alphabetically

Installation

npm i -g @hovrcat/reorder-json

Testing

  1. npm i

  2. npm test

Usage

From command line

OptionRequiredDescription
--iPath to the JSON file to be reordered
--oWhere to save the reordered JSON file

Example: reorder -i /path/to/file.json

In code

const { Reorder } = require('@hovrcat/reorder-json');
const handler = new Reorder();
// then await the promise
await handler.reorderJSON(inputPath, outputPath);
// or handle it in the traditional way
handler.reorderJSON(inputPath, outputPath)
        .then(() => { 
            //... 
        });
1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago