Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2023-04-20 11:11:38 +02:00
parent 4add277c36
commit 9ffc7144ae
1 changed files with 8 additions and 1 deletions

View File

@ -2,7 +2,7 @@
* @name BDFDB * @name BDFDB
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 3.2.7 * @version 3.2.8
* @description Required Library for DevilBro's Plugins * @description Required Library for DevilBro's Plugins
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -394,6 +394,13 @@ module.exports = (_ => {
BDFDB.ObjectUtils.isEmpty = function (obj) { BDFDB.ObjectUtils.isEmpty = function (obj) {
return !BDFDB.ObjectUtils.is(obj) || Object.getOwnPropertyNames(obj).length == 0; return !BDFDB.ObjectUtils.is(obj) || Object.getOwnPropertyNames(obj).length == 0;
}; };
BDFDB.ObjectUtils.copy = function (obj) {
if (!BDFDB.ObjectUtils.is(obj)) return obj;
let copy = {};
for (let key in obj) copy[key] = obj[key];
for (let key of Reflect.ownKeys(obj.constructor.prototype)) if (!copy[key] && obj[key] !== undefined) copy[key] = obj[key];
return copy;
};
BDFDB.ArrayUtils = {}; BDFDB.ArrayUtils = {};
BDFDB.ArrayUtils.is = function (array) { BDFDB.ArrayUtils.is = function (array) {