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.3.0 to 1.4.0

4

cmd.js

@@ -28,2 +28,4 @@ #!/usr/bin/env node

var indent = detectIndent(file).indent || ' ';
// Detect end of line if any
var eol = /}(\r\n|\n|\r)$/.exec(file, 'gm');

@@ -42,4 +44,4 @@ // Parse JSON

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

@@ -5,0 +5,0 @@ "main": "index.js",

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