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.
		
		
		
		
		
			
		
			
				
					12 lines
				
				460 B
			
		
		
			
		
	
	
					12 lines
				
				460 B
			| 
								 
											3 years ago
										 
									 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * Checks whether the entire input sequence can be matched
							 | 
						||
| 
								 | 
							
								 * against the regular expression.
							 | 
						||
| 
								 | 
							
								 * @return {boolean}
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								export default function matchesEntirely(text, regular_expression) {
							 | 
						||
| 
								 | 
							
								  // If assigning the `''` default value is moved to the arguments above,
							 | 
						||
| 
								 | 
							
								  // code coverage would decrease for some weird reason.
							 | 
						||
| 
								 | 
							
								  text = text || '';
							 | 
						||
| 
								 | 
							
								  return new RegExp('^(?:' + regular_expression + ')$').test(text);
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								//# sourceMappingURL=matchesEntirely.js.map
							 |