Decoders for validating and transforming boolean values
const boolean: Decoder<boolean>
import { boolean } from 'decoders';
boolean.decode(true); // ✓ true
boolean.decode(false); // ✓ false
boolean.decode(1); // ✗ Error: Must be boolean
boolean.decode('true'); // ✗ Error: Must be boolean
const truthy: Decoder<boolean>
import { truthy } from 'decoders';
truthy.decode(true); // ✓ true
truthy.decode(false); // ✓ false
truthy.decode(1); // ✓ true
truthy.decode(0); // ✓ false
truthy.decode('hello'); // ✓ true
truthy.decode(''); // ✓ false
truthy.decode(null); // ✓ false
truthy.decode(undefined); // ✓ false
truthy.decode([]); // ✓ true