puvox-library 1.0.28 → 1.0.29
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/library_standard.js +15 -0
- package/package.json +1 -1
package/library_standard.js
CHANGED
@@ -435,6 +435,21 @@ const puvox_library =
|
|
435
435
|
return result;
|
436
436
|
},
|
437
437
|
|
438
|
+
renameKey (obj, keyFrom, keyTo) {
|
439
|
+
for (const key of Object.keys(obj)) {
|
440
|
+
obj[keyTo] = obj[keyFrom];
|
441
|
+
delete obj[keyFrom];
|
442
|
+
}
|
443
|
+
return obj;
|
444
|
+
},
|
445
|
+
renameSubKey (obj, keyFrom, keyTo) {
|
446
|
+
for (const key of Object.keys(obj)) {
|
447
|
+
obj[key][keyTo] = obj[key][keyFrom];
|
448
|
+
delete obj[key][keyFrom];
|
449
|
+
}
|
450
|
+
return obj;
|
451
|
+
},
|
452
|
+
|
438
453
|
hasEmptyChild(obj){
|
439
454
|
let hasEmpty = false;
|
440
455
|
if(this.isObject(obj)) {
|