@yuneta/gobj-js 7.26.6 → 7.26.8
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 +23 -2
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +81 -73
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +23 -2
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +79 -71
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +23 -2
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +10 -2
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +23 -2
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +10 -2
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.iife.min.js
CHANGED
|
@@ -1755,6 +1755,7 @@ var gobjJs = function(e) {
|
|
|
1755
1755
|
function hr(e, t, n) {
|
|
1756
1756
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
1757
1757
|
const r = e ? et(e) + ": " : "";
|
|
1758
|
+
if (!tr(n)) return hn(`${r}kw_delete(): path must be a string: ${String(n)}`), -1;
|
|
1758
1759
|
let [l, o] = function(e, t) {
|
|
1759
1760
|
let n = e.lastIndexOf(t);
|
|
1760
1761
|
return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
|
|
@@ -1860,6 +1861,7 @@ var gobjJs = function(e) {
|
|
|
1860
1861
|
}
|
|
1861
1862
|
function Sr(e, t, n, r) {
|
|
1862
1863
|
if (e && !sr(e) && hn("GObj bad instanceof"), !Zn(t)) return hn("kw is not an object"), -1;
|
|
1864
|
+
if (!tr(n)) return hn(`${e ? et(e) + ": " : ""}kw_set_dict_value(): path must be a string: ${String(n)}`), -1;
|
|
1863
1865
|
let l = n.split("`"), o = l.length;
|
|
1864
1866
|
for (let s = 0; s < o; s++) {
|
|
1865
1867
|
let i = l[s];
|
|
@@ -1880,8 +1882,12 @@ var gobjJs = function(e) {
|
|
|
1880
1882
|
}
|
|
1881
1883
|
function wr(e, t, n, r, l) {
|
|
1882
1884
|
if (e && !sr(e) && hn("GObj bad instanceof"), !Zn(t)) return hn("kw is not an object"), -1;
|
|
1883
|
-
let o =
|
|
1884
|
-
|
|
1885
|
+
let o = mr(e, t, n, !1);
|
|
1886
|
+
if (void 0 === o) {
|
|
1887
|
+
if (!tr(n)) return -1;
|
|
1888
|
+
if (o = {}, Sr(e, t, n, o) < 0) return -1;
|
|
1889
|
+
}
|
|
1890
|
+
return Zn(o) ? (br(o, r, l), 0) : (hn(`subdict is not an object: '${n}'`), -1);
|
|
1885
1891
|
}
|
|
1886
1892
|
function Nr(e, t, r) {
|
|
1887
1893
|
let l = "", o = !1;
|
|
@@ -3164,6 +3170,7 @@ var gobjJs = function(e) {
|
|
|
3164
3170
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3165
3171
|
if (!l) return hn("jdb_delete: topic not found: " + t), null;
|
|
3166
3172
|
if (ir(r.id)) return hn("jdb_delete: record without id: " + r), Tn(r), null;
|
|
3173
|
+
if (!tr(n)) return hn(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
3167
3174
|
let o, s = n.split("`"), i = l;
|
|
3168
3175
|
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i = Yr(i, null, o, !1);
|
|
3169
3176
|
if (0 === s.length && i) if (er(i)) {
|
|
@@ -3196,6 +3203,7 @@ var gobjJs = function(e) {
|
|
|
3196
3203
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3197
3204
|
if (!l) return hn("jdb_update: topic not found: " + t), null;
|
|
3198
3205
|
if (ir(r.id)) return hn("jdb_update: record without id: " + r), Tn(r), null;
|
|
3206
|
+
if (!tr(n)) return hn(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
3199
3207
|
let o, s = n.split("`"), i = l;
|
|
3200
3208
|
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, [], 1)), i = Yr(i, null, o, !1);
|
|
3201
3209
|
if (0 === s.length && i) if (er(i)) i.push(r);
|