11 lines
252 B
JavaScript
11 lines
252 B
JavaScript
/**
|
|
* Makes it easier to document regexes because you can break them up
|
|
*
|
|
* @param {...string} args
|
|
* @returns {Regexp}
|
|
*/
|
|
export function compileMultilineRegex(...args) {
|
|
const regexprStr = args.join("");
|
|
return new RegExp(regexprStr);
|
|
}
|