1 2 3 4 5 6 7 8 9 10 11 12
import { class2type } from "../var/class2type.js"; import { toString } from "../var/toString.js"; export function toType( obj ) { if ( obj == null ) { return obj + ""; } return typeof obj === "object" ? class2type[ toString.call( obj ) ] || "object" : typeof obj; }