Show HN: Is-Kit โ€“ Lightweight TypeScript Guard and Validator Toolkit
github.comยท19hยท
Discuss: Hacker News

is-kit

Lightweight, zero-dependency toolkit for building isFoo style type guards in TypeScript. Runtime-safe ๐Ÿ›ก๏ธ, composable ๐Ÿงฉ, and ergonomic โœจ.

๐Ÿ‘‰ See full document

Why?

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.

Install

Node via npm

pnpm add is-kit
# or
bun add is-kit
# or
npm i is-kit
# or
yarn add is-kit

ESM and CJS builds are provided for npm consumers. Types are bundled.

JSR (TypeScript source)

// Deno/Bun/JSR-aware tooling
import { define, and, or } from 'jsr:@nyaomaru/is-kit';

Quick start

Build is functions from tiny, composable pieces:

Similar Posts

Loading similar posts...