Comparing version 2.1.1 to 2.1.2
@@ -24,2 +24,19 @@ "use strict"; | ||
} | ||
else if (typeof update[key] === 'object' && !Array.isArray(update[key])) { | ||
const parts = key.split('.'); | ||
let target = doc; | ||
while (parts.length > 1) { | ||
const part = parts.shift(); | ||
if (part !== undefined) { | ||
if (!target[part]) { | ||
target[part] = {}; | ||
} | ||
target = target[part]; | ||
} | ||
} | ||
const lastPart = parts[0]; | ||
if (lastPart !== undefined) { | ||
target[lastPart] = { ...target[lastPart], ...update[key] }; | ||
} | ||
} | ||
else { | ||
@@ -26,0 +43,0 @@ doc[key] = update[key]; |
{ | ||
"name": "verse.db", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "verse.db isn't just a database, it's your universal data bridge. Designed for unmatched flexibility, security, and performance, verse.db empowers you to manage your data with ease.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
700944
9130