• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

RobinTail / express-zod-api / 13358212482

16 Feb 2025 07:41PM UTC coverage: 100.0%. First build
13358212482

Pull #2409

github

web-flow
Merge 42c973fb2 into ba4ba9a24
Pull Request #2409: Ref: improving `Documentation` helper `intersect()`

1263 of 1289 branches covered (97.98%)

20 of 20 new or added lines in 1 file covered. (100.0%)

4219 of 4219 relevant lines covered (100.0%)

209.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/express-zod-api/src/date-in-schema.ts
1
import { z } from "zod";
4✔
2
import { isValidDate } from "./schema-helpers";
4✔
3

4
export const ezDateInBrand = Symbol("DateIn");
4✔
5

6
export const dateIn = () => {
4✔
7
  const schema = z.union([
60✔
8
    z.string().date(),
60✔
9
    z.string().datetime(),
60✔
10
    z.string().datetime({ local: true }),
60✔
11
  ]);
60✔
12

13
  return schema
60✔
14
    .transform((str) => new Date(str))
60✔
15
    .pipe(z.date().refine(isValidDate))
60✔
16
    .brand(ezDateInBrand as symbol);
60✔
17
};
60✔
18

19
export type DateInSchema = ReturnType<typeof dateIn>;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc