typeOf()
typeOf()
typeOf()Gets the specific object type of any value.
const typeOf = (value: any): string =>
Object.prototype.toString.call(value).slice(8, -1).toLowerCase();Parameters
value: any
value: anyThe value of any type to obtain its object class name.
Returns
The return value is the object class name of the given value.
Example usage
Last updated
Was this helpful?