isDate.ts 104 Bytes
Newer Older
liang ce committed
1 2 3
export function isDate(value: any): value is Date {
  return value instanceof Date && !isNaN(+value);
}