JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 324158
  • Score
    100M100P100Q168295F
  • License MIT

Takes a json-file and return a copy of the same file, but sorted

Package Exports

  • sort-json

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-json) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

sort-json

Takes a json-file and return a copy of the same file, but with the keys sorted

installation

[sudo] npm -g install sort-json

usage

var sortJson = require('sort-json');

var copy = sortJson(object);

CLI usage

sort-json file.json

For now sort-json takes no other arguments, so the original file will be overwritten by a sorted json file, keeping the indentation of the original file.