We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 667028d commit 2e1194bCopy full SHA for 2e1194b
src/index.js
@@ -4,7 +4,8 @@ const tlds = require('tlds');
4
/* istanbul ignore next */
5
const SafeRegExp = (() => {
6
try {
7
- return require('re2');
+ const RE2 = require('re2');
8
+ return typeof RE2 === 'function' ? RE2 : RegExp;
9
} catch {
10
return RegExp;
11
}
0 commit comments