JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 31
  • Score
    100M100P100Q60504F
  • License Apache-2.0

Sort JSON file keys

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sort-keys-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    sort-keys-cli

    CLI tool for sindresorhus/sort-keys

    Why

    • Alphabetize any JSON file quickly for easier organization
    • Can be used as a way to sort a Swagger/OpenAPI document

    Usage

    $ sort-keys <source>[ <destination>]

    Options

    -d, --deep      Deep sort all objects
    -s, --std      Use STDIN and STDOUT instead of files
    <source>        Source JSON file (if not using STDIN)
    <destination>   (Optional) Destination file location (if not using STDOUT). Will overwrite source if not provided.

    Examples

    Sort all keys in a JSON file
    $ sort-keys example.json --deep