Skip to content

Commit

Permalink
fix(shared): improve isDate check (#5803)
Browse files Browse the repository at this point in the history
  • Loading branch information
EnlonW committed May 13, 2022
1 parent 4d7803e commit eef1447
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const isMap = (val: unknown): val is Map<any, any> =>
export const isSet = (val: unknown): val is Set<any> =>
toTypeString(val) === '[object Set]'

export const isDate = (val: unknown): val is Date => val instanceof Date
export const isDate = (val: unknown): val is Date => toTypeString(val) === '[object Date]'
export const isFunction = (val: unknown): val is Function =>
typeof val === 'function'
export const isString = (val: unknown): val is string => typeof val === 'string'
Expand Down

0 comments on commit eef1447

Please sign in to comment.