write-json-file
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -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", |
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
7244
131
6
+ Addedis-plain-obj@^2.0.0