Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sort-json

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sort-json - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

.eslintrc

7

cmd.js

@@ -43,4 +43,9 @@ #!/usr/bin/env node

// Saving to file
fs.writeFile(filePath, JSON.stringify(sortedObject, null, indent) + ((eol && eol.length === 2) ? eol[1] : ''));
fs.writeFile(filePath, JSON.stringify(sortedObject, null, indent) + ((eol && eol.length === 2) ? eol[1] : ''), function(err) {
if (err) {
console.error(err);
process.exit(1);
}
});
}
}
{
"name": "sort-json",
"version": "1.4.0",
"version": "1.4.1",
"description": "Takes a json-file and return a copy of the same file, but sorted",

@@ -12,5 +12,15 @@ "main": "index.js",

},
"devDependencies": {},
"devDependencies": {
"chai": "^3.5.0",
"dirty-chai": "^1.2.2",
"eslint": "^3.8.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^2.0.1",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.4.1",
"mocha": "^3.1.2"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha --recursive tests",
"lint": "eslint tests"
},

@@ -17,0 +27,0 @@ "repository": {

9

README.md
sort-json
=========
Takes a json-file and return a copy of the same file, but with the keys sorted
It takes a JSON file and returns a copy of the same file, but with the sorted keys.

@@ -25,2 +25,7 @@ installation

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.
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.
tests
-----
`npm test`
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc