is-what

JS type check (TypeScript supported) functions like `isPlainObject() isArray()` etc. A simple & small integration.

MIT License

Downloads
29.4M
Stars
180
Committers
13
is-what -

Published by mesqueeb over 3 years ago

  • fix: update Record<string, any> to Record<string | number | symbol, any> d08fb9c
  • feat: add isFullObject 0496462
  • Merge branch 'production' of https://github.com/mesqueeb/is-what into production 9201f39
  • lint bb901a5
  • refactor: tweak build/tsconfig a824c91
  • Update README.md 31175cf

https://github.com/mesqueeb/is-what/compare/v3.13.0...v3.14.0

is-what -

Published by mesqueeb over 3 years ago

  • feat: Add isOneOf 5a4f6ee
  • feat: add isFullArray 88d6e4c

others

  • chore: build 34c0f86
  • Merge branch 'production' of https://github.com/mesqueeb/is-what into production 0365fa4
  • chore: update dependencies c6e9ac5
  • Merge pull request #17 from thewilkybarkid/is-one-of 6e0510c
  • fix: support generator functions ba0474e
  • fix: make sure it returns true for both Function and AsyncFunction fc99bc1
  • fix: improve types f2432b5
  • chore: update depenencies 2b994c9
  • docs: update syntax highlighting 87302f7

https://github.com/mesqueeb/is-what/compare/v3.11.1...v3.13.0

is-what - Deno release πŸ¦•

Published by mesqueeb about 4 years ago

Deno release πŸ¦•

is-what - Deno πŸ¦•

Published by mesqueeb about 4 years ago

Support Deno!

is-what - isPlainObject vs isAnyObject 🎭

Published by mesqueeb about 5 years ago

πŸŽ‰πŸ»πŸΈπŸ’ƒπŸΎπŸŽˆπŸŽΆ

Now averaging about 400,000 weekly downloads!!!
Thanks so much for all the support on is-what!

isPlainObject vs isAnyObject πŸ¦€

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. β˜•οΈ

is-what - TypeScript to the moon! 🌝

Published by mesqueeb about 6 years ago

TypeScript πŸ’

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.

New functions 🧒

  • isPrimitive to check if a payload is a JavaScript primitive or not
  • isType to check that the given payload is of a given type (useful to check for classes!)

All new Documentation! πŸ•Ά

Completely rewrote the Readme!

is-what - πŸ¦• no more NaN!

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! 🏜

is-what - [Jun 19, 2018] isWhat is released!

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.