Hoi hoi!👋

YAAAAAY!!! 😸🎉🎉🎉
is-kit has reached 200 GitHub stars!! ⭐

GitHub logo necoz-oss / is-kit

Build small guards. Compose them. A lightweight, zero-dependency toolkit for building reusable TypeScript type guards that compose, refine, and preserve natural narrowing. Runtime-safe 🛡️, composable 🧩, and ergonomic ✨.

is-kit

is-kit logo

npm version JSR npm downloads License

Build small guards. Compose them.

is-kit is a lightweight, zero-dependency toolkit for building reusable TypeScript type guards.

is-kit is not just a collection of isX helpers. Its main focus is composing small runtime checks into reusable guards while preserving useful TypeScript narrowing.

It helps you write small isFoo functions, compose them into richer runtime checks, refine properties on values you already know about, and keep TypeScript narrowing natural inside regular control flow. Use it at runtime boundaries when needed, without requiring a schema-first workflow.

Runtime-safe 🛡️, composable 🧩, and ergonomic ✨ without asking you to adopt a heavy schema workflow.

  • Build and reuse typed guards
  • Compose guards with and, or, not, oneOf
  • Use refineKey to narrow a child property while preserving its parent type
  • Validate object shapes and collections when that is useful
  • Parse or assert unknown values without a large schema framework
Documentation Site

Best…

When is-kit reached 50 stars, I wrote about how we use it in a real production application serving more than 100,000 users. ⭐

When it reached 100 stars, I wrote about new APIs, runtime edge cases, and an interesting type inference issue involving Effect. ⭐

And now,

200 stars! 🚀⭐⭐⭐

So, what happened this time? 👀

  • Did we discover another crazy TypeScript bug?
  • Did we completely rewrite the library in Rust?
  • Did a cat accidentally delete the entire repository?

Nope. 😹

Something different happened.

More and more people started building is-kit together!!!🚀

is-kit star200

🐈 is-kit Found a New Home!

One of the biggest changes since reaching 100 stars is that is-kit moved from my personal GitHub account to a new open-source organization called Necoz.

The idea behind Necoz is pretty simple.

Small. Simple. Useful.

I wanted to create a place where developers could build small, useful tools together, regardless of their experience, background, or where they live. 😸

And is-kit has become one of the projects that brought these people together.

It's really exciting to see something that started as my little TypeScript library gradually become a community project. 🐈

🏆 Meet the Cats Behind is-kit!

Between v1.16.3 and v1.16.6 alone, we welcomed 25 new contributors!!!😻😻😻

Some improved the documentation.
Some discovered runtime edge cases.
Some strengthened TypeScript inference tests.
And some came back again and again to help improve the library!

Let me introduce these amazing cats. 😸

🛡️ Making Runtime Behavior More Reliable

  • @painbaba — Fixed a subtle issue in oneOfValues involving mutated array inputs.
  • @saimskywalker — Improved plain-object detection.
  • @tridev-tej — Strengthened error-handling tests for safeJsonParse.
  • @chirag-gupta7 — Improved coverage for equals and guardIn.
  • @wathsalaggg — Verified that property-presence guards do not unnecessarily read property values.
  • @srijavuppala — Strengthened the runtime guarantees of assert.
  • @Doomguy-BFG9000 — Improved regression coverage for lazy.
  • @psjdeveloper — Improved predicate behavior tests for define.

🧪 Making Our Guards Easier to Trust

  • @AmirAbaris — Strengthened type-level tests for refineKey.
  • @diyaryavuz — Improved tuple validation and property refinement tests.
  • @Pratham2511 — Expanded parsing and sparse-array regression coverage.
  • @Aaqibhafeezkhan — Verified evaluation order and short-circuiting in oneOf.
  • @crims0n — Improved tests for predicateToRefine.
  • @GyulianoDev — Strengthened array guard tests.
  • @BoteroAlejandro11 — Improved short-circuit coverage for mapOf.
  • @tylrcc — Contributed documentation and regression tests across multiple APIs.

📚 Making is-kit Easier to Understand

  • @guhcostan — Clarified safeParse result semantics.
  • @nuriadevs — Documented the finite-number behavior of isNumber.
  • @agenticsymphony-tech — Clarified error boundaries in safeJsonParse.
  • @atokim4 — Explained the differences between optional value and property guards.
  • @deba2k5 — Documented equality and array-input behavior in oneOfValues.
  • @ArnabOPP — Improved documentation for union narrowing with oneOf.
  • @Lil-Clanky — Improved documentation and edge-case coverage for tupleOf and equalsKey.
  • @daocuong11 — Improved documentation, tests, and contributor experience across numerous APIs.

🔧 Making Developer Tooling Better

Look at all these cats!!! 😹🐈🐈‍⬛🐱
And of course, thank you to everyone else who has contributed to is-kit along the way! 🙌

👉 Meet all is-kit contributors on GitHub

Thank you, everyone! 💚💚💚

🤔 Why Do These Small Contributions Matter?

A lot of these contributions aren't flashy new features.

But that's actually something I really like.

Consider a simple property guard.

import { hasKey } from "is-kit"; const input = { get name() { throw new Error("Oops!"); }, }; hasKey("name")(input); // true 

Should checking whether an own property exists require reading its value?

No!

And thanks to our contributors, this kind of behavior is now explicitly covered by regression tests.

There are many similar questions.

  • Should a guard stop evaluating after a validation failure?
  • Should a wrapper preserve exceptions thrown by the original guard?
  • Should mutating an original array affect an already-created guard?
  • Should a property refinement preserve the rest of the original type?

These are small questions individually.

But together, they determine whether a library behaves predictably.

And when your library is designed around composing small runtime checks, predictable behavior really matters.

A new API might attract attention.

A good regression test might prevent a future bug that nobody will ever hear about.

Both are valuable contributions to OSS. 🙌

🔥 What's New? Standard Schema Support!

Of course, we also have some technical news!

Starting with v1.17.0, is-kit supports Standard Schema through a new API called toStandardSchema.

Standard Schema defines a common validation interface that allows TypeScript libraries and tools to work together without requiring library-specific integrations.

And now, you can turn your existing is-kit guards into Standard Schema-compatible validators.

import { isString, toStandardSchema } from "is-kit"; const schema = toStandardSchema(isString); schema["~standard"].validate("hello"); // { value: "hello" } schema["~standard"].validate(123); // { issues: [{ message: "Invalid value" }] } 

Super simple, right? 😸

The interesting part is that you don't need to rewrite your existing guards.

For example, you can define a reusable guard like this 👇

import { isString, struct, toStandardSchema } from "is-kit"; const isUser = struct({ name: isString, }); const userSchema = toStandardSchema(isUser); 

And use it with a Standard Schema-compatible tool such as TanStack Form.

import { useForm } from "@tanstack/react-form"; function useUserForm() { return useForm({ defaultValues: { name: "", }, validators: { onChange: userSchema, }, }); } 

Meanwhile, your original guard is still a normal TypeScript type guard.

const input: unknown = { name: "Ada" }; if (isUser(input)) { input.name; // string } const users: unknown[] = [ { name: "Ada" }, { name: 123 }, ]; const validUsers = users.filter(isUser); // [{ name: "Ada" }] 

One guard, multiple use cases.

No additional dependencies.
No new validation framework.
Just a small bridge between is-kit and the wider TypeScript ecosystem. 🚀

You can read more here:

💪 What Has Changed Since 100 Stars?

Besides Standard Schema support, we've been working on:

  • More precise runtime contracts.
  • Better documentation and practical examples.
  • Stronger runtime and type-level regression tests.
  • TypeScript compatibility.
  • Developer tooling and contributor experience.

We also launched a dedicated documentation website!

👉 is-kit.dev

But the original philosophy hasn't changed.

Build small guards. Compose them.

I still want is-kit to feel like a natural extension of TypeScript, rather than something that requires you to change the way you write your entire application.

More useful doesn't have to mean more complicated.

🎯 What's Next? Road to 300 Stars!

Our next milestone is

300 GitHub stars!!! ⭐⭐⭐

But I don't just want to increase the star counter.

Before reaching 300 stars, I'd love to see:

  • More developers using is-kit in real applications.
  • More integrations with the TypeScript ecosystem.
  • Clearer documentation and more practical examples.
  • A more consistent and intuitive API.
  • More contributors joining us and sharing their ideas.

And most importantly, I want contributing to is-kit to continue being fun! 😸

You don't need to implement a huge feature to participate.

  • Fix a typo.
  • Add a test.
  • Improve an example.
  • Ask a question.
  • Tell us about something that feels confusing.

There are plenty of ways to help.

👉 Find your next OSS quest

💚 Thank You for 200 Stars!

At 50 stars, I was happy that someone found my idea useful.
At 100 stars, I was happy that people were finding interesting ways to use it.
At 200 stars, I'm happy that I'm no longer building it alone.

That's probably my favorite change since the last milestone.

Thank you to everyone who has starred, used, shared, or contributed to is-kit.

And to all the cats who are building it together,

Let's keep going!!! 🐈🚀

GitHub logo necoz-oss / is-kit

Build small guards. Compose them. A lightweight, zero-dependency toolkit for building reusable TypeScript type guards that compose, refine, and preserve natural narrowing. Runtime-safe 🛡️, composable 🧩, and ergonomic ✨.

is-kit

is-kit logo

npm version JSR npm downloads License

Build small guards. Compose them.

is-kit is a lightweight, zero-dependency toolkit for building reusable TypeScript type guards.

is-kit is not just a collection of isX helpers. Its main focus is composing small runtime checks into reusable guards while preserving useful TypeScript narrowing.

It helps you write small isFoo functions, compose them into richer runtime checks, refine properties on values you already know about, and keep TypeScript narrowing natural inside regular control flow. Use it at runtime boundaries when needed, without requiring a schema-first workflow.

Runtime-safe 🛡️, composable 🧩, and ergonomic ✨ without asking you to adopt a heavy schema workflow.

  • Build and reuse typed guards
  • Compose guards with and, or, not, oneOf
  • Use refineKey to narrow a child property while preserving its parent type
  • Validate object shapes and collections when that is useful
  • Parse or assert unknown values without a large schema framework
Documentation Site

Best…

Thank you for reading! 🤲