yooda

🧘‍♂️600b validation library with support for custom handlers and messages.

MIT License

Downloads
20
Stars
33
Committers
2

Bot releases are hidden (Show)

yooda - Better error reporting and more error reporting! 👀 Latest Release

Published by ooade over 4 years ago

Error reporting

  • We changed the way we report an error so instead of throwing key must be a $dataType, we throw key is expected to be of type "$dataType".
  • And, instead of throwing $value does not satisfy the domain $domainName, we return $value assigned to $key does not satisfy the $domainName domain which is a lot clearer as you get to know the exact defaulter in a large codebase.
  • We now throw an error if the domain isn't an array!

Tests

The test file is a lot cleaner now with more test cases than the previous versions.

yooda - Custom Error Handlers & Better Types

Published by ooade over 4 years ago

v0.2.0 ships in really exciting features such as:

  • Better types which makes Intellisense better
  • Custom Error Handlers. Just pass in an object of error handlers as second argument to yooda and you're good to go 🚀

You can go through the README and test files for implementation details.