This commit is contained in:
2024-03-31 18:19:26 +08:00
parent b502385272
commit 60cb832b02
10 changed files with 107 additions and 109 deletions

View File

@@ -57,20 +57,20 @@ export function sortASCII(obj: any, isSort = true) {
return sortObj;
}
Array.prototype.contains = function(obj: any) {
let i = this.length;
while (i--) {
if(this[i] === obj) {
return true;
}
}
return false;
};
// Array.prototype.contains = function(obj: any) {
// let i = this.length;
// while (i--) {
// if(this[i] === obj) {
// return true;
// }
// }
// return false;
// };
export function parseParameter(obj: any) {
if(obj === null || obj === undefined) return '';
const arr = [];
const keys: string[] = Object.keys(obj);
const keys: any = Object.keys(obj);
const entries: any[] = Object.entries(obj);
for (const [key, value] of entries) {
if(keys.contains(key) && !key.startsWith('function')) {