MCPcopy
hub / github.com/prisma/prisma / isDate

Function isDate

packages/client/src/runtime/utils/date.ts:1–7  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

1export function isDate(value: unknown): value is Date {
2 return (
3 value instanceof Date ||
4 // date created in other JS context (for example, worker)
5 Object.prototype.toString.call(value) === '[object Date]'
6 )
7}
8
9export function isValidDate(date: Date) {
10 return date.toString() !== 'Invalid Date'

Callers 3

encodeParameterFunction · 0.90
deepCloneValueFunction · 0.90
serializeArgumentsValueFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected