Skip to content

Releases: dhoulb/blork

Minor version

28 Mar 10:50
Compare
Choose a tag to compare

Minor version bump. Includes minor API changes not considered breaking.

  • Rename FormattedError to ValueError (more descriptive and reusable name).
  • Make ValueError the default error thrown by Blork (not TypeError, but ValueError extends TypeError).

Minor release

27 Mar 03:58
Compare
Choose a tag to compare

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 applies format() 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

27 Mar 01:46
Compare
Choose a tag to compare

Minor documentation improvements

Major version

27 Mar 01:27
Compare
Choose a tag to compare
  • Major internal rewrite with API kept almost the same.
  • Add support for combining checkers with | and & syntax.
  • check() and args() 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 to add()).

Minor version

11 Feb 05:05
Compare
Choose a tag to compare

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

09 Feb 01:47
Compare
Choose a tag to compare

arraylike/args checker should allow zero (empty arguments) but wasn't.

Minor version

09 Feb 01:13
Compare
Choose a tag to compare
  • Improve strictness of literal array and object types.
  • Improve debugging of objects that have had their internals messed with
  • Reorganise tests

Bugfix release

08 Feb 23:21
Compare
Choose a tag to compare
3.3.3

Version 3.3.3

Bugfix release

07 Feb 16:36
Compare
Choose a tag to compare

Re-release of 3.3.0 to republish to NPM.

Bugfix release

07 Feb 16:34
Compare
Choose a tag to compare

Re-release of previous release to republish to NPM.