Sha256: eb4d9cd3e0ffcba856abb81ed00f98e2bfe7cebf473bdad26d18198f405bbb1d
Contents?: true
Size: 386 Bytes
Versions: 26
Compression:
Stored size: 386 Bytes
Contents
/** * @param {unknown} obj * @returns {string} */ export function type(obj) { if (typeof obj === 'undefined') { return 'undefined'; } if (obj === null) { return 'null'; } const stringTag = obj[Symbol.toStringTag]; if (typeof stringTag === 'string') { return stringTag; } const type = Object.prototype.toString.call(obj).slice(8, -1); return type; }
Version data entries
26 entries across 26 versions & 1 rubygems