is-regex is a lightweight npm package that reliably checks if a given value is a JavaScript Regular Expression object. It returns true if the input is a RegExp instance and false otherwise. This package is useful for validating data types and ensuring that functions receiving regular expressions as arguments are handling them correctly preventing potential errors. It boasts a small footprint and dependency-free design making it ideal for performance-sensitive environments.
The npm package is-regex has had sporadic releases since 2014. Initial releases were in 2014 and 2015, with occasional updates in 2017, 2019, and 2020-2021. Two releases occurred in late 2024, but there have been no releases in 2025 as of September 11th. The release frequency is inconsistent with long periods of inactivity.
is-regex npm package downloads show a general upward trend from March 2024 to August 2025, peaking in June and July 2025 with over 250 million downloads. September 2025 downloads are significantly lower, likely due to incomplete data for the month.