|
|
@@ -1,13 +1 @@ |
|
|
|
import * as v from 'valibot'; |
|
|
|
export * from 'valibot'; |
|
|
|
|
|
|
|
export const datelike = () => v.transform( |
|
|
|
v.union([ |
|
|
|
v.string([v.isoDate()]), |
|
|
|
v.string([v.isoDateTime()]), |
|
|
|
v.number(), |
|
|
|
v.date() |
|
|
|
]), |
|
|
|
(value) => new Date(value).toISOString(), |
|
|
|
v.string([v.isoTimestamp()]) |
|
|
|
); |