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
				
				571 B
			
		
		
			
		
	
	
					23 lines
				
				571 B
			| 
								 
											3 years ago
										 
									 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * Returns true iff the domain of hostname matches.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * Examples:
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * ``` js
							 | 
						||
| 
								 | 
							
								 * dnsDomainIs("www.netscape.com", ".netscape.com")
							 | 
						||
| 
								 | 
							
								 *   // is true.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * dnsDomainIs("www", ".netscape.com")
							 | 
						||
| 
								 | 
							
								 *   // is false.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * dnsDomainIs("www.mcom.com", ".netscape.com")
							 | 
						||
| 
								 | 
							
								 *   // is false.
							 | 
						||
| 
								 | 
							
								 * ```
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * @param {String} host is the hostname from the URL.
							 | 
						||
| 
								 | 
							
								 * @param {String} domain is the domain name to test the hostname against.
							 | 
						||
| 
								 | 
							
								 * @return {Boolean} true iff the domain of the hostname matches.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								export default function dnsDomainIs(host: string, domain: string): boolean;
							 |