Lightweight, zero-dependency toolkit for building isFoo style type guards in TypeScript. Runtime-safe 🛡️, composable 🧩, and ergonomic ✨.
Tired of writing the same isFoo again and again? Let is-kit do it for you:
- Less boilerplate
- Type-safe
- Composable
- Zero-dependency
☕ Grab a coffee, let is-kit do the boring work.
Node via npm
ESM and CJS builds are provided for npm consumers. Types are bundled.
Build is functions from tiny, composable pieces:
These primitives plug into higher-level combinators like struct when you need to shape objects.
- Define once: define<T>(fn) turns a plain function into a type guard.
- Upgrade predicates: predicateToRefine(fn) adds narrowing.
- Compose freely: and, or, not, oneOf, arrayOf, struct …
- Stay ergonomic: helpers like nullable, optional, equals, safeParse.
👉 See the docs app under docs/ (API Reference section). Each helper is documented with runnable examples.
Requires Node 22 and pnpm 10.12.4 (via Corepack or mise). Want to hack on is-kit? See DEVELOPER.md for setup, scripts, and contribution workflow.
See CONTRIBUTE.md for workflow, commit style, and tool setup. 🚀
.png)

