refactor(common): remove isDate from facade (#13895)

This commit is contained in:
Dzmitry Shylovich 2017-01-30 21:26:21 +03:00 committed by Miško Hevery
parent 80d3e14ce4
commit 9d2c71269b
2 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@
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 {InvalidPipeArgumentError} from './invalid_pipe_argument_error';
@ -140,3 +140,7 @@ export class DatePipe implements PipeTransform {
function isBlank(obj: any): boolean {
return obj == null || obj === '';
}
function isDate(obj: any): obj is Date {
return obj instanceof Date && !isNaN(obj.valueOf());
}

View File

@ -81,10 +81,6 @@ export function isStrictStringMap(obj: any): boolean {
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 {
if (typeof token === 'string') {
return token;