Update from Vibe Studio

This commit is contained in:
Vibe Studio
2026-01-16 02:20:32 +00:00
parent a4605e311a
commit 71de1506ca
28603 changed files with 2179459 additions and 0 deletions

26
node_modules/dset/merge/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,26 @@
export function merge(a, b, k) {
if (typeof a === 'object' && typeof b === 'object')  {
if (Array.isArray(a) && Array.isArray(b)) {
for (k=0; k < b.length; k++) {
a[k] = merge(a[k], b[k]);
}
} else {
for (k in b) {
if (k === '__proto__' || k === 'constructor' || k === 'prototype') break;
a[k] = merge(a[k], b[k]);
}
}
return a;
}
return b;
}
export function dset(obj, keys, val) {
keys.split && (keys=keys.split('.'));
var i=0, l=keys.length, t=obj, x, k;
while (i < l) {
k = ''+keys[i++];
if (k === '__proto__' || k === 'constructor' || k === 'prototype') break;
t = t[k] = (i === l) ? merge(t[k],val) : (typeof(x=t[k])===typeof keys) ? x : (keys[i]*0 !== 0 || !!~(''+keys[i]).indexOf('.')) ? {} : [];
}
}