Returns whether the given pattern can be compiled to a regex
Optional
the pattern to check
any combination of flag values
whether the given pattern can be compiled to a regex
isCompilable(undefined); // falseisCompilable('foobar'); // trueisCompilable('[a-zA-Z0-9]+', 'g'); // true Copy
isCompilable(undefined); // falseisCompilable('foobar'); // trueisCompilable('[a-zA-Z0-9]+', 'g'); // true
Returns whether the given pattern can be compiled to a regex