index.d.ts 296 B

1234567891011121314151617181920
  1. /**
  2. Check if a value is a regular expression.
  3. @example
  4. ```
  5. import isRegexp = require('is-regexp');
  6. isRegexp('unicorn');
  7. //=> false
  8. isRegexp(/unicorn/);
  9. //=> true
  10. isRegexp(new RegExp('unicorn'));
  11. //=> true
  12. ```
  13. */
  14. declare function isRegexp(input: unknown): input is RegExp;
  15. export = isRegexp;