Skip to content

Releases: nvie/decoders

v1.2.0

18 Dec 20:47
Compare
Choose a tag to compare
  • New feature: regex(), for building custom string decoders
  • Tiny tweaks to improve error messages (more structural improvements are on the roadmap)

v1.0.0

08 Dec 12:49
Compare
Choose a tag to compare

This is the first stable release, and marks a point where I'm comfortable with the public API and I expect no signature changes in it.

  • BREAKING Removes the old public ("compat") API
  • Finalize/settle on new public API

v0.1.0

30 Oct 12:29
Compare
Choose a tag to compare
  • Breaking change New API: simplified names, split up decoders from guards.
    What used to be called "decoders" in 0.0.x ("things that either return
    a value or throw a runtime error") are now called "guards" in 0.1.0.
    The meaning of the term "decoders" is now changed to a thing that either is
    an "Ok" value or an "Err" value.

    To convert to the new API, do this:

    // Old way
    import { decodeNumber, decodeObject, decodeString } from 'decoders';
    
    const decoder = decodeObject({
        name: decodeString(),
        age: decodeNumber(),
    });
    
    // -------------------------------------------------------------------
    
    // New way
    import { guard, number, object, string } from 'decoders';
    
    const guard = guard(object({
        name: string,
        age: number,
    }));

v0.0.7

10 Oct 10:51
Compare
Choose a tag to compare
  • Decoders have been split up into multiple files
  • Tests were added
  • Coverage has increased a bit