20 lines
		
	
	
		
			505 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			505 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
| "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, flags) {
 | |
|   var regexpAsStringLiteral = parts.join('');
 | |
|   return new RegExp(regexpAsStringLiteral, flags);
 | |
| }
 | |
| module.exports = exports.default;
 | |
| module.exports.default = exports.default; |