Comparing version 8.0.1 to 8.0.2
@@ -298,8 +298,8 @@ const isObject = value => { | ||
function entries(value) { | ||
const result = Object.entries(value); | ||
if (Array.isArray(value)) { | ||
// We use `[...value]` to convert sparse entries to normal ones. | ||
return [...value].map((value, index) => [index, value]); | ||
return result.map(([key, value]) => [Number(key), value]); | ||
} | ||
return Object.entries(value); | ||
return result; | ||
} | ||
@@ -306,0 +306,0 @@ |
{ | ||
"name": "dot-prop", | ||
"version": "8.0.1", | ||
"version": "8.0.2", | ||
"description": "Get, set, or delete a property from a nested object using a dot path", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -138,2 +138,4 @@ # dot-prop | ||
Sparse arrays are supported. In general, [avoid using sparse arrays](https://github.com/sindresorhus/dot-prop/issues/109#issuecomment-1614819869). | ||
#### object | ||
@@ -140,0 +142,0 @@ |
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
16825
169