You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
296 B
20 lines
296 B
/** |
|
Check if a value is a regular expression. |
|
|
|
@example |
|
``` |
|
import isRegexp = require('is-regexp'); |
|
|
|
isRegexp('unicorn'); |
|
//=> false |
|
|
|
isRegexp(/unicorn/); |
|
//=> true |
|
|
|
isRegexp(new RegExp('unicorn')); |
|
//=> true |
|
``` |
|
*/ |
|
declare function isRegexp(input: unknown): input is RegExp; |
|
|
|
export = isRegexp;
|
|
|