There are libraries like @sindresorhus/is out there that are more widely used, which are therefore more battle-tested/robust and (perhaps most importantly) more comprehensive.
I suggest copying my code from https://github.com/alloc/is/blob/master/src/is.ts (which is written to be tree-shakeable and not rely on NodeJS types anywhere). Then we can update its implementation to align with @sindresorhus/is to achieve the same robustness without the baggage.
There are libraries like
@sindresorhus/isout there that are more widely used, which are therefore more battle-tested/robust and (perhaps most importantly) more comprehensive.I suggest copying my code from https://github.com/alloc/is/blob/master/src/is.ts (which is written to be tree-shakeable and not rely on NodeJS types anywhere). Then we can update its implementation to align with
@sindresorhus/isto achieve the same robustness without the baggage.