decoders

Elegant validation library for type-safe input data (for TypeScript and Flow)

MIT License

Downloads
47.8K
Stars
357
Committers
14

Bot releases are visible (Hide)

decoders - v1.24.0

Published by nvie over 3 years ago

  • New decoders:

    • describe: change the error message for an existing decoder
  • Add support for Flow 0.153.x

  • Drop support for Node 13.x (unstable)

decoders - v1.23.5

Published by nvie over 3 years ago

  • TypeScript: Add missing export for tuple1
decoders - v1.23.4

Published by nvie over 3 years ago

TypeScript types:

  • Add missing export for nonEmptyString
decoders - v1.23.3

Published by nvie about 4 years ago

  • Returned objects that are the result from object(), inexact(), and exact() decoders will no longer contain explicit undefined values for optional keys, but instead those keys will be missing in the returned object entirely. (#574, thanks @w01fgang!)
decoders - v1.23.2

Published by nvie about 4 years ago

  • Add missing exports for nonEmptyArray and nonEmptyString (for TypeScript)
decoders - v1.23.1

Published by nvie about 4 years ago

  • Include an error code with every FlowFixMe suppression (Flow 0.132.x compatibility)
decoders - v1.23.0

Published by nvie about 4 years ago

  • New decoders:
    • json: decodes any valid JSON value
    • jsonObject: decodes any valid JSON object
    • jsonArray: decodes any valid JSON array
decoders - v1.22.2

Published by nvie over 4 years ago

  • New decoders:

  • Improved type inference for object() and exact() decoders (see #515, thanks @dimfeld)

  • DecoderType is now an alias for $DecoderType (to support both TypeScript and Flow conventional naming)

  • GuardType (and $GuardType) is a new type function to extract the type of a guard instance

decoders - v1.22.1

Published by nvie over 4 years ago

decoders - v1.22.0

Published by nvie over 4 years ago

decoders - v1.21.0

Published by nvie over 4 years ago

  • New decoder lazy(): lazily-evaluated decoder, suitable to define
    self-referential types.

  • Fix compatibility with Flow 0.127.0

decoders - v1.20.2

Published by nvie over 4 years ago

  • Fix compatibility with Flow 0.126.0+
decoders - v1.20.1

Published by nvie over 4 years ago

  • Upgrade debrief to correct (final) version
decoders - v1.20.0

Published by nvie over 4 years ago

  • Fix issue where infinite recursion occurs when input object (the object being validated) contains a circular reference
decoders - v1.20.0-rc1

Published by nvie over 4 years ago

decoders - v1.19.1

Published by nvie over 4 years ago

  • Republish due to an NPM outage
decoders - v1.19.0

Published by nvie over 4 years ago

New decoders:

  • To complement the tuple family of decoders, there's now also tuple1 (thanks
    @sfarthin!)
decoders - v1.18.1

Published by nvie over 4 years ago

  • Also fix Flow type bugs when Flow option exact_by_default=true in debrief dependency
decoders - v1.18.0

Published by nvie over 4 years ago

New decoders:

  • nonEmptyString: like string, but will fail on inputs with only whitespace
    (or the empty string)

  • nonEmptyArray: like array, but will fail on inputs with 0 elements

Fixes:

  • Fix Flow type bugs when Flow option exact_by_default=true is enabled
decoders - v1.17.0

Published by nvie almost 5 years ago

May cause breakage for Flow users:*

  • Fix subtle bug in object() and exact() Flow type definitions that could
    cause Flow to leak any under rare circumstances.

(*: For TypeScript users, this version is identical to v1.16.1.)