Releases: dhoulb/blork
Releases · dhoulb/blork
Minor version
Minor version bump. Includes minor API changes not considered breaking.
- Rename
FormattedError
toValueError
(more descriptive and reusable name). - Make
ValueError
the default error thrown by Blork (not TypeError, but ValueError extends TypeError).
Minor release
A minor release. Only introduces new features and has no backwards-incompatible API changes.
- Allow custom error to be set for custom checkers via
add()
- Export
debug()
which allows any value to be converted to a string in a clean and clear format. - Export
format()
which takes three arguments (message, value, prefix) and returns a consistently and beautifully formatted error message. - Export
FormattedError
which takes the same three arguments and appliesformat()
so it always has beautiful errors. - Export
BlorkError
(which is thrown when you're using Blork wrong) for the purposes of checking thrown errors against it.
Bugfix release
Minor documentation improvements
Major version
- Major internal rewrite with API kept almost the same.
- Add support for combining checkers with
|
and&
syntax. check()
andargs()
no longer return anything (previously returned the number of passing values).- Custom checkers should now return
boolean
(message/description for the checker can be passed in as third field toadd()
).
Minor version
New features:
- Allow addition of an
[ANY]
property on literal object types to check excess/additional properties true
,false
,undefined
,null
, can all be used as checkers (and correspond to corresponding string types)
Bugfix release
arraylike/args checker should allow zero (empty arguments) but wasn't.
Minor version
- Improve strictness of literal array and object types.
- Improve debugging of objects that have had their internals messed with
- Reorganise tests
Bugfix release
3.3.3 Version 3.3.3
Bugfix release
Re-release of 3.3.0 to republish to NPM.
Bugfix release
Re-release of previous release to republish to NPM.