JS type check (TypeScript supported) functions like `isPlainObject() isArray()` etc. A simple & small integration.
MIT License
https://github.com/mesqueeb/is-what/compare/v3.13.0...v3.14.0
others
https://github.com/mesqueeb/is-what/compare/v3.11.1...v3.13.0
Published by mesqueeb about 4 years ago
Deno release π¦
Published by mesqueeb about 4 years ago
Support Deno!
Published by mesqueeb about 5 years ago
Now averaging about 400,000 weekly downloads!!!
Thanks so much for all the support on is-what
!
Starting version 3.0 i've deprecated isObject
as checker, since it's too ambiguous.
It's much better to be accurate between "any kind of object" and just a "plain JS object".
See the documentation here.
--is-what was made with β₯ by Luca Ban.If this library helped you in any way you can support me by buying me a cup of coffee. βοΈ
Published by mesqueeb about 6 years ago
is-what is now fully TypeScript supported! It will let TypeScript know mid-way an if statement which type the variable is if you check it with is-what. π€―
Check the readme section on TypeScript.
isPrimitive
to check if a payload is a JavaScript primitive or notisType
to check that the given payload is of a given type (useful to check for classes!)Completely rewrote the Readme!
Published by mesqueeb about 6 years ago
isWhat now returns false
when a number is NaN
or a date is invalid!
I made this change because I could think of no use cases where you wouldn't want this behaviour.
Please update to v2.0.0!
Enjoy! π
Published by mesqueeb about 6 years ago
isWhat
is an easy and clean way to do type checking in JavaScript.
I built this library because other solutions were either too complex or didn't do exactly what I wanted.