npm install
npm run lint
npm test
npm run build
These commands cover the main package responsibilities:
lint performs TypeScript-only validationtest runs the Vitest suitebuild emits ESM, CJS, and declaration files through tsupnpm run dev
npm run test:watch
src/index.ts Public package entrypoint
src/checks/ Validation classes, shared types, and helpers
help/ Source markdown guides for TypeDoc project documents
docs/ Generated TypeDoc site output
test/ Vitest coverage for the exported surface
dist/ Generated output
When adding new checks:
src/checks/.src/checks/index.ts.src/index.ts if it should be public.test/.README.md and docs/checks.md if the public API changes.The package now mixes synchronous validators with async entry points.
ObjectCheck.check() and ArrayCheck.checkEach() can consume promised checksValueCheck.isTrue(), ObjectCheck.isTrue(), and ArrayCheck.isTrueEach() support async predicatesFieldCheck.file() and FieldCheck.image() return promises because binary data must be loaded before validationWhen updating docs or examples, prefer await at the outer rule boundary and use result(...) for the final output shape after the awaited check chain resolves.
The current machine has a Homebrew Node runtime issue related to ICU libraries. If npm run lint or npm run build aborts before TypeScript runs, switch to a working Node installation before validating release changes.