is-regexp
Check if a value is a regular expression
Why not just use instanceof instead of this package?
instanceof does not work correctly for all types and it does not work across realms. Examples of realms are iframes, windows, web workers, and the vm module in Node.js.