Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 2x 222x 222x 222x 222x |
/**
* 判断类型
* @param params
*/
export const getClass = (params: unknown): string | null => {
const str = Object.prototype.toString.call(params);
const matchResult = /^\[object (.*)\]$/.exec(str);
Eif (matchResult !== null) {
return matchResult[1].toLowerCase();
}
return null;
} |