Hoi hoi!π
YAAAAAY!!! πΈπππ
is-kit has reached 200 GitHub stars!! β
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
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
refineKeyto narrow a child property while preserving its parent type - Validate object shapes and collections when that is useful
-
Parse or assert
unknownvalues without a large schema framework
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 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
oneOfValuesinvolving mutated array inputs. - @saimskywalker β Improved plain-object detection.
-
@tridev-tej β Strengthened error-handling tests for
safeJsonParse. -
@chirag-gupta7 β Improved coverage for
equalsandguardIn. - @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
safeParseresult 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
tupleOfandequalsKey. - @daocuong11 β Improved documentation, tests, and contributor experience across numerous APIs.
π§ Making Developer Tooling Better
- @lanangptraa β Improved CLI option validation.
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-kitin 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.
π 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!!! ππ
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
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
refineKeyto narrow a child property while preserving its parent type - Validate object shapes and collections when that is useful
-
Parse or assert
unknownvalues without a large schema framework
Bestβ¦
Thank you for reading! π€²


Top comments (53)
200 stars is lovely, but I think the 25 new contributors between those releases are an even bigger milestone. π
I liked the
hasKeyexample too. Checking that a property exists shouldn't read its value, so it's great to see that covered by regression tests.Congratulations to you and everyone contributing to is-kit! Here's to 300! π
Thank you so much!! πΈπ
I completely agree! Welcoming 25 new contributors is even more exciting to me than reaching 200 stars.
I'm looking forward to seeing how both is-kit and our community evolve on the road to 300 stars! ππ
The collaboration on Dev.to is next level! Way to go on creating this community who is chipping in and sharing their passion for improvement. Looking forward to the next milestone.
woohoo π
Woooohoooo!! Thank you so much! πΉπ
I'm really happy that DEV has brought so many passionate developers together!
Seeing people support each other and grow together is even more exciting than watching the star counter go up.
Let's keep this wonderful community growing! Next stop: 300 stars! πΈππ
Let's!
Next target: 200 stars! Nyaomaru, good luck! πΌ
Remember this?
Congrats πππ»β€οΈ
Thanks for writing ππ»
Of course I remember!! πΉπ
Your encouragement really keeps me going!
Thank you for cheering me on since the last milestone! πΈ
We made it to 200, and now we're aiming for 300 stars! βπ
Let's go!!! π
Ayooooo let's go!! π₯ππ»
ππΈ
Didi, please come on Discord tomorrow.
Hey, sorry about tomorrow, I won't be able to make it lol. I'm feeling a bit sick right now, so I need to get some rest. Let's catch up on Dec 10 :D
Congratulations on 200 stars, nyaomaru! πβ
I'm really happy to see is-kit growing this fast. You know I love tinkering, so I went poking around and noticed how well organized everything is, SEO included. Nice work! π
Big thanks to all the contributors, but I'm pretty sure you're the one behind all of it. πΈ
Keep going like this! I'm way too swamped right now to send a pull request, but I'd really love to join in someday. It's a great group.
Thanks for sharing these good vibes π! signed BeeLadybugπππ
Thank you so much!! πΈπ
Haha!! You've even been investigating our SEO! Nothing escapes the curious BeeLadybug! πΉπ
I'm really grateful to have such wonderful contributors. Their ideas and small improvements keep motivating me too!
And there's absolutely no rush to contribute! Whenever you have some free time, we'd be happy to have you join in.
Let's keep enjoying OSS at our own pace! ππππ
Haha guilty! π A curious ladybug has to check how the big cats do it πΉ
Thank you, that means a lot. I'll come by when things calm down a bit, even with something small.
Our own pace sounds perfect πππ
Congrats! 25 new contributors is a great sign. Moving to an org is also a good moment to write down the quiet things: who has admin and publishing rights, and under what terms contributions come in. A short note in CONTRIBUTING can save a lot of doubts later.
Thank you so much! πΈπ
I completely agree! As the community grows, having clear documentation about permissions, responsibilities, and contribution guidelines becomes increasingly important.
I'd love to make sure everyone can contribute confidently without any confusion.
Thanks for the valuable advice! ππ
Happy to help! Even a simple 3-line clause in CONTRIBUTING.md clarifying inbound licensing (e.g., 'contributions are licensed under the repo's MIT license') plus a MAINTAINERS.md file usually covers 95% of early-stage friction. Best of luck on the road to 300 stars!
200 stars is good news. 25 contributors between v1.16.3 and v1.16.6 is the number I would put on the wall. Stars follow posts; contributors follow docs and tests.
The
hasKeyexample is the one I'd steal. I hit the same bug in a config loader: the guard readconfig.nameto check the key, the getter threw, and the stack trace pointed at my guard instead of the config file.One fixture caught it after that:
two lines. It runs against every guard in my suite now, so the next one that peeks at a value fails a test instead of a production load.
Did you go the shared-harness route, or does each guard still carry a hand-written test?
Thank you so much!! πΈπ
I love your getter trap example! π
Currently, we're taking the hand-written test approach.
For example,
hasKeyandhasKeyshave dedicated regression tests usingjest.fn()to verify that getters are never invoked during property-presence checks.A shared harness for guards that should only check property presence could be an interesting improvement!
Of course, guards like
refineKeyintentionally read property values, so we'd need to distinguish their expected behaviors.Thanks for sharing your real-world experience and testing approach! ππ
Congrats!!!!!!!!
Thank you sooooo much!!!! πΉππ
Your encouragement always gives me the motivation to keep going!ππ
Congratulations for 200 stars π
Thx! πΈπ
Congratsπ
Thx! πΈπΌ
Congratulationsβand I think
toStandardSchemais the most consequential part for future contributors, because the public contract now includes an adapter boundary as well as the guards themselves.A useful next regression suite would cover things such as:
That would let the core keep its βsmall guards, composedβ philosophy while preventing ecosystem integrations from becoming a second, subtly different implementation. The throwing-getter example is a great model for this: a tiny example that turns an invisible assumption into an explicit contract.
Thank you! That's a really thoughtful suggestion! πΈπ
The current design intentionally keeps the adapter thin, synchronous, and delegates validation entirely to the original guard.
Explicit regression tests for invocation count, synchronous behavior, and preservation of the original guard's contract would be valuable additions.
I'd love to strengthen these guarantees without introducing unnecessary complexity into the core.
Thank you for taking the time to think about the future of is-kit! π