3 lines
243 B
JavaScript
3 lines
243 B
JavaScript
|
export default function _cloneRegExp(pattern) {
|
||
|
return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : ''));
|
||
|
}
|