You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
586 B
23 lines
586 B
4 weeks ago
|
"use strict";
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.default = multilineRegexp;
|
||
|
|
||
|
/**
|
||
|
* Build RegExp object from an array
|
||
|
* of multiple/multi-line regexp parts
|
||
|
*
|
||
|
* @param {string[]} parts
|
||
|
* @param {string} flags
|
||
|
* @return {object} - RegExp object
|
||
|
*/
|
||
|
function multilineRegexp(parts) {
|
||
|
var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||
|
var regexpAsStringLiteral = parts.join('');
|
||
|
return new RegExp(regexpAsStringLiteral, flags);
|
||
|
}
|
||
|
|
||
|
module.exports = exports.default;
|
||
|
module.exports.default = exports.default;
|