Attempts to extract the type of a JavaScript Object
npm install extracttypeAttempts to extract the type of a JavaScript object. For built-ins
it returns their internal [[Class]] slot, for custom constructed
objects it attempts to extract the name of their constructor. Exports
a function extractType to that end.
If using with Internet Explorer this function will work better if
you polyfill the missing Function.prototype.name property.
All of the ES 2015+ stuff (arrow fns, const, Symbol, Promise, class,Object.entries, Array.prototype.from, Array.prototype.includes, etc.
will obviously have to be transpiled/polyfilled). Uses JavaScript
modules (i.e. import/export) and you will need to use a very new
browser or an appropriate loader (e.g. webpack).
isSameType function IS NOT 100% RELIABLE. I highly