Tired of typeof returning 'object' for everything, so I built this — would love some feedback.
فى الاساس كانت الفكره من البروجكت للدخول فى اعماق الـ JavaScript Data Types
لما كنت لسه بتعلمها و كذلك للسبب الى مكتوب فالـ Title
حابب اسمع كل اﻷراء و التقييمات من فضلكم الحلوه و المش حلوه
و لو حبيت فكرته مسي على اخوك بـ Star
Semantic type checking for JavaScript.
JavaScript's type-checking is a mess. typeof works fine for primitives, but hand it null, an array, or a regexp — you get 'object'. Every time. So you end up sprinkling Array.isArray(), instanceof, and custom string-parsing all over your codebase just to know what you're actually dealing with.
is.js is a semantic validator that gets this right. It handles the cases typeof drops the ball on, and goes further — it can look inside strings like '{"id": "xyz"}' or '[1, 2, 3]' and understand what the data actually means, not just what container it's sitting in. It runs in two modes: Smart Inference for when you want it to interpret string content, and Literal Mode for when you need strict, no-surprises checks. And if you prefer a chainable style, there's a fluent API for that too.
>Why not just use Zod or similar schema validators?
Schema validators are awesome — you define what you expect first, then validate against it. That's the whole point, it's schema-first: z.string().parse('hello') — you're telling it "I expect a string" before anything runs.
My library doesn't care what you expect. You hand it a value, it tells you what it actually is. No schema, no setup. Different tools, different jobs.