Skip to content

Releases: lkster/Safetify

v3.0.0

17 Feb 03:44

Choose a tag to compare

General

  • Changed errors to return input's type instead of static value label
  • Possibility to set property as optional (i.e. value can be undefined but not null)
  • Errors are now always returned as string[] instead of previous string or string[]. If there are no errors, array is just empty (instead of previous null)
  • Rewritten all resolvers to be 100% class-based
  • Made all resolvers immutable (nullable, optional, defaultsTo and constraint options)
  • Added CHANGELOG.md file

Bugfixes

  • Tuple now returns error if given input tuple has less or more places than expected
  • Fixed ITupleDefinition type
  • Fixed Tuple to return basic safe-valued tuple if provided input is not an array (previously it provided Result objects in all places where should be exact value)
  • Fixed NumberResolver to return NaN if not-nullable get null input (previously it was converting null to 0)

v2.7.1

25 Sep 22:13

Choose a tag to compare

Bugs

  • Fixed returning null value for advanced object resolvers with nullable flag set when input was correct except one or more properties / items

v2.7.0

25 Sep 22:13

Choose a tag to compare

Features

  • Added PartialResolver

Bugs

  • Fixed DateResolver's unit tests to not be dependent on timezone

Contribution:
guitarino

v2.6.1

25 Sep 22:08

Choose a tag to compare

Technical:

  • Changed SimpleTypeResolver name to PrimitiveResolver
  • Fixed TypeScript's path alias bug in vscode

v2.6.0

13 Aug 18:27

Choose a tag to compare

Features

  • Added Tuple resolver

v2.5.0

28 Jun 21:55

Choose a tag to compare

Features

  • Added isPrimitive utility function
  • Added isNull utility function

v2.4.1

24 May 19:19

Choose a tag to compare

Fixes

  • Added resolving default values of constraints

v2.4.0

15 May 21:55

Choose a tag to compare

Features

  • Added possibility to create constraints for primitive type resolvers

v2.3.0

10 May 21:53

Choose a tag to compare

Features

  • Added isDict utility function

Fixed

  • Added utility functions to bundle
  • Updated typing file with adding utility functions

v2.2.1

07 May 18:44

Choose a tag to compare

Features

  • Added utility functions for checking value types