Comparing version 4.1.0 to 4.2.0
11
index.js
@@ -54,9 +54,14 @@ 'use strict'; | ||
const value = object[key]; | ||
let newValue; | ||
if (deep && Array.isArray(value)) { | ||
result[key] = deepSortArray(value); | ||
continue; | ||
newValue = deepSortArray(value); | ||
} else { | ||
newValue = deep && isPlainObject(value) ? sortKeys(value) : value; | ||
} | ||
result[key] = deep && isPlainObject(value) ? sortKeys(value) : value; | ||
Object.defineProperty(result, key, { | ||
...Object.getOwnPropertyDescriptor(object, key), | ||
value: newValue | ||
}); | ||
} | ||
@@ -63,0 +68,0 @@ |
{ | ||
"name": "sort-keys", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "Sort the keys of an object", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6041
99