优化
This commit is contained in:
@@ -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')) {
|
||||
|
Reference in New Issue
Block a user