superstruct-chain
v0.0.1
Published
Enables chaining syntax in superstruct
Readme
superstruct-chain
A simple module that enables the chaining of calls with superstruct, so you can avoid parenthesis hell in your object definitions.
Usage
import { string, number, object } from 'superstruct';
import 'superstruct-chain';
const Config = object({
port: number().defaulted(80),
address: string().optional(),
});Methods added
The following methods are monkey-patched into the prototype of Struct:
These methods should be invoked without the first argument of their functional counterpart.
