feat(project): init

This commit is contained in:
2026-02-03 18:05:47 +08:00
commit f37a119eff
188 changed files with 29246 additions and 0 deletions

13
libs/util.ts Normal file
View File

@@ -0,0 +1,13 @@
/**
* @description: 判断值是否为某个类型
*/
export function is(val: unknown, type: string) {
return toString.call(val) === `[object ${type}]`
}
/**
* @description: 是否为数值
*/
export function isNumber(val: unknown): val is number {
return is(val, "Number")
}