@yuneta/gobj-js 7.26.6 → 7.26.7
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 +8 -0
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +2 -0
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +8 -0
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +71 -69
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +8 -0
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +2 -0
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +8 -0
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +2 -0
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.cjs.js
CHANGED
|
@@ -4065,6 +4065,10 @@ function strrchr_split(str, char) {
|
|
|
4065
4065
|
function kw_delete(gobj, kw, path) {
|
|
4066
4066
|
if (gobj && !is_gobj(gobj)) log_error(`GObj bad instanceof`);
|
|
4067
4067
|
const prefix = gobj ? gobj_short_name(gobj) + ": " : "";
|
|
4068
|
+
if (!is_string(path)) {
|
|
4069
|
+
log_error(`${prefix}kw_delete(): path must be a string: ${String(path)}`);
|
|
4070
|
+
return -1;
|
|
4071
|
+
}
|
|
4068
4072
|
let [path_, k] = strrchr_split(path, "`");
|
|
4069
4073
|
let v = kw;
|
|
4070
4074
|
if (!empty_string(k)) {
|
|
@@ -4431,6 +4435,10 @@ function kw_set_dict_value(gobj, kw, path, value) {
|
|
|
4431
4435
|
log_error("kw is not an object");
|
|
4432
4436
|
return -1;
|
|
4433
4437
|
}
|
|
4438
|
+
if (!is_string(path)) {
|
|
4439
|
+
log_error(`${gobj ? gobj_short_name(gobj) + ": " : ""}kw_set_dict_value(): path must be a string: ${String(path)}`);
|
|
4440
|
+
return -1;
|
|
4441
|
+
}
|
|
4434
4442
|
let ss = path.split("`");
|
|
4435
4443
|
let len = ss.length;
|
|
4436
4444
|
for (let i = 0; i < len; i++) {
|