Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-01-29 11:39:02 +01:00
parent 3cd29d5b8f
commit a6d7ad1715
1 changed files with 6 additions and 0 deletions

View File

@ -312,6 +312,12 @@ module.exports = (_ => {
BDFDB.ObjectUtils.isEmpty = function (obj) {
return !BDFDB.ObjectUtils.is(obj) || Object.getOwnPropertyNames(obj).length == 0;
};
BDFDB.ObjectUtils.mirror = function (obj) {
if (!BDFDB.ObjectUtils.is(obj)) return {};
let newObj = Object.assign({}, obj);
for (let key in newObj) newObj[newObj[key]] = key;
return newObj;
};
BDFDB.ArrayUtils = {};
BDFDB.ArrayUtils.is = function (array) {