mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 22:22:34 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
11 lines
483 B
TypeScript
11 lines
483 B
TypeScript
// Loaded from https://deno.land/x/ramda@v0.27.2/source/internal/_cloneRegExp.js
|
|
|
|
|
|
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' : ''));
|
|
}
|