swc/crates/swc_bundler/tests/.cache/deno/b347172b9485f4da7366eae189c05440e8d9ec39.ts

17 lines
424 B
TypeScript
Raw Normal View History

// Loaded from https://deno.land/x/segno@v1.1.0/lib/helpers/multilineRegex.ts
/**
* Build RegExp object from an array
* of multiple/multi-line regexp parts
*
* @param {string[]} parts
* @param {string} flags
* @return {object} - RegExp object
*/
export const multilineRegexp = (parts: string[], flags = '') => {
const regexpAsStringLiteral = parts.join('');
return new RegExp(regexpAsStringLiteral, flags);
};