Socket
Socket
Sign inDemoInstall

write-json-file

Package Overview
Dependencies
11
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 4.1.1

3

index.js

@@ -9,2 +9,3 @@ 'use strict';

const detectIndent = require('detect-indent');
const isPlainObj = require('is-plain-obj');

@@ -28,3 +29,3 @@ const readFile = promisify(fs.readFile);

if (options.sortKeys) {
if (options.sortKeys && isPlainObj(data)) {
data = sortKeys(data, {

@@ -31,0 +32,0 @@ deep: true,

{
"name": "write-json-file",
"version": "4.1.0",
"version": "4.1.1",
"description": "Stringify and write JSON to a file atomically",

@@ -39,2 +39,3 @@ "license": "MIT",

"graceful-fs": "^4.1.15",
"is-plain-obj": "^2.0.0",
"make-dir": "^3.0.0",

@@ -41,0 +42,0 @@ "sort-keys": "^3.0.0",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc