and

Usage: and(...)

Returns a spec that returns the conformed value. Succesive conformed values propagate through rest of predicates

Source

Example:

const s = require('speculaas');
const {isInteger, isEven} = s.utils;

s.def('::even?', s.and(isInteger, isEven));

s.isValid('::even?', 12);
// true

results matching ""

    No results matching ""