Module Utilities

A collection of functional utilities for working with results from decoder functions.

Example

import * as D from 'common-decoders';
import { pipe, map, fold } from 'common-decoders/utils';

const result: string = pipe(
1,
D.number,
map((n) => n + 1),
fold(
(error) => `Failed with message ${error}`,
(value) => `Got value ${value}`
)
);

Index

Type Aliases

Functions

Generated using TypeDoc