rearrage_stuff
This commit is contained in:
10
utils/regex.js
Normal file
10
utils/regex.js
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Makes it easier to document regexes because you can break them up
|
||||
*
|
||||
* @param {...string} args
|
||||
* @returns {Regexp}
|
||||
*/
|
||||
export function pretty(...args) {
|
||||
const regexprStr = args.join("");
|
||||
return new RegExp(regexprStr);
|
||||
}
|
||||
Reference in New Issue
Block a user