3 ms·
How about any => Object.prototype.toString.call(any).slice(8, -1)
by threatofrain 5y ago
How about
any => Object.prototype.toString.call(any).slice(8, -1)
- nsonha 5y agobit more self-explanatory `it => Object.prototype.toString.call(it).match(/^\[object (\w+)]/).pop()`
- nsonha 5y agoor even this typeName = Object.prototype.toString.call
- JoBrad 5y agoI really like this package, because it not only uses the method you mentioned for checking types, but is written in TS, so you get the type checking feedback. https://github.com/sindresorhus/is https://github.com/sindresorhus/is
- deleted 5y ago[deleted]