We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d7803e commit eef1447Copy full SHA for eef1447
packages/shared/src/index.ts
@@ -52,7 +52,7 @@ export const isMap = (val: unknown): val is Map<any, any> =>
52
export const isSet = (val: unknown): val is Set<any> =>
53
toTypeString(val) === '[object Set]'
54
55
-export const isDate = (val: unknown): val is Date => val instanceof Date
+export const isDate = (val: unknown): val is Date => toTypeString(val) === '[object Date]'
56
export const isFunction = (val: unknown): val is Function =>
57
typeof val === 'function'
58
export const isString = (val: unknown): val is string => typeof val === 'string'
0 commit comments