1.1.0 • Published 4 years ago

io-ts-decode v1.1.0

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

Decode with error to reduce boilerplate

import ioTsDecode from 'io-ts-decode'
import * as t from 'io-ts'
import { pipe } from 'fp-ts/lib/pipeable'

const onLeft = (e: Error): string => String(e)

const onRight = (s: string) => `No errors: ${s}`

pipe(
    ioTsDecode(t.string, null),
    ... // compose with other `TaskEither`s
)
1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago