jjb-lc-designable
Version:
基于alibaba-designable源码二次封装的表单设计器。
11 lines (10 loc) • 324 B
text/typescript
import { isStr, isFn } from './types'
import { globalThisPolyfill } from './globalThisPolyfill'
export const instOf = (value: any, cls: any) => {
if (isFn(cls)) return value instanceof cls
if (isStr(cls))
return globalThisPolyfill[cls]
? value instanceof globalThisPolyfill[cls]
: false
return false
}