@quenk/preconditions
Version:
Make data satisfy constraints before using.
13 lines (12 loc) • 380 B
TypeScript
import { Type } from '@quenk/noni/lib/data/type';
import { Precondition } from './';
/**
* isBoolean tests if a value is a boolean.
*/
export declare const isBoolean: Precondition<Type, boolean>;
/**
* toBoolean casts a value to a boolean.
*
* Basically anything that is not null or undefined results in true.
*/
export declare const toBoolean: Precondition<Type, boolean>;