MCPcopy Create free account
hub / github.com/Barrior/JParticles / typeChecking

Function typeChecking

src/utils/checking.ts:10–13  ·  view source on GitHub ↗
(value: any, type: string)

Source from the content-addressed store, hash-verified

8 * @param type 预期类型
9 */
10export function typeChecking(value: any, type: string): boolean {
11 // 直接使用 toString.call(value) 在 ie 会下报错
12 return Object.prototype.toString.call(value) === type
13}
14
15/**
16 * 检测 value 是否为函数

Callers 3

checking.spec.tsFile · 0.90
isFunctionFunction · 0.85
isPlainObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected