JOJoBrad·Oct 12, 2021
I 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
In Tricks I wish I knew when I learned TypeScript