refactor(common): remove isDate from facade (#13895)
This commit is contained in:
		
							parent
							
								
									80d3e14ce4
								
							
						
					
					
						commit
						9d2c71269b
					
				| @ -8,7 +8,7 @@ | |||||||
| 
 | 
 | ||||||
| import {Inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core'; | import {Inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core'; | ||||||
| 
 | 
 | ||||||
| import {NumberWrapper, isDate} from '../facade/lang'; | import {NumberWrapper} from '../facade/lang'; | ||||||
| 
 | 
 | ||||||
| import {DateFormatter} from './intl'; | import {DateFormatter} from './intl'; | ||||||
| import {InvalidPipeArgumentError} from './invalid_pipe_argument_error'; | import {InvalidPipeArgumentError} from './invalid_pipe_argument_error'; | ||||||
| @ -140,3 +140,7 @@ export class DatePipe implements PipeTransform { | |||||||
| function isBlank(obj: any): boolean { | function isBlank(obj: any): boolean { | ||||||
|   return obj == null || obj === ''; |   return obj == null || obj === ''; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | function isDate(obj: any): obj is Date { | ||||||
|  |   return obj instanceof Date && !isNaN(obj.valueOf()); | ||||||
|  | } | ||||||
|  | |||||||
| @ -81,10 +81,6 @@ export function isStrictStringMap(obj: any): boolean { | |||||||
|   return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO; |   return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export function isDate(obj: any): obj is Date { |  | ||||||
|   return obj instanceof Date && !isNaN(obj.valueOf()); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| export function stringify(token: any): string { | export function stringify(token: any): string { | ||||||
|   if (typeof token === 'string') { |   if (typeof token === 'string') { | ||||||
|     return token; |     return token; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user