UNPKG

is-what

Version:

JS type check (TypeScript supported) functions like `isPlainObject() isArray()` etc. A simple & small integration.

5 lines (4 loc) 154 B
/** Returns the object type of the given payload */ export function getType(payload) { return Object.prototype.toString.call(payload).slice(8, -1); }