@yuneta/gobj-js 7.26.10 → 7.26.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gobj-js.cjs.js +17 -9
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +149 -148
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +17 -9
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +9 -8
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +17 -9
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +151 -150
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +17 -9
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +9 -8
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.umd.min.js
CHANGED
|
@@ -3214,16 +3214,17 @@
|
|
|
3214
3214
|
if (!l) return hn("jdb_update: topic not found: " + t), null;
|
|
3215
3215
|
if (ir(r.id)) return hn("jdb_update: record without id: " + r), Tn(r), null;
|
|
3216
3216
|
if (!tr(n)) return hn(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
3217
|
-
let o, s = n.split("`"),
|
|
3218
|
-
for (; (o =
|
|
3219
|
-
if (!
|
|
3220
|
-
if (
|
|
3221
|
-
else if (i.id === r.id) Gn(i, r);
|
|
3217
|
+
let o, s, i = n.split("`"), _ = l;
|
|
3218
|
+
for (; (o = i.shift()) && !ir(o) && _;) Zn(_) && (_ = Or(null, _, e.hook, null, 0)), _ = Yr(_, null, o, !1);
|
|
3219
|
+
if (!_ || 0 !== i.length) return hn(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
3220
|
+
if (er(_)) s = _;
|
|
3222
3221
|
else {
|
|
3223
|
-
|
|
3224
|
-
|
|
3222
|
+
if (_.id === r.id) return Gn(_, r), l;
|
|
3223
|
+
if (s = Or(null, _, e.hook, null, 0), null == s) s = [], Yn(_, e.hook, s);
|
|
3224
|
+
else if (!er(s)) return hn(`jdb_update: the hook '${e.hook}' of '${n}' is not a list in topic '${t}'`), null;
|
|
3225
3225
|
}
|
|
3226
|
-
|
|
3226
|
+
let a = Yr(s, e.hook, r.id, !1);
|
|
3227
|
+
return a ? Gn(a, r) : s.push(r), l;
|
|
3227
3228
|
}, e.json2flat = function(e) {
|
|
3228
3229
|
const t = {}, n = (e, r, l) => {
|
|
3229
3230
|
if (l > ll) throw new Error("json2flat: deeper than 256");
|