Search Docs
typeOf
以字符串形式获取给定 value 的类型。
value
import { typeOf } from 'funtool'; typeOf('hello'); // 'string' typeOf(42); // 'number' typeOf(true); // 'boolean' typeOf({}); // 'object' typeOf([]); // 'array' typeOf(null); // 'null' typeOf(undefined); // 'undefined'
function typeOf(v: any): string
v
any
string