UNPKG

@typed/io

Version:

Runtime IO type system

14 lines 443 B
import { hasOwnProperty, keysOf } from '@typed/objects'; import { Record } from './Record'; export function partial(props) { return { is: (a) => { if (Record.is(a)) { const propsToCheck = keysOf(a).filter((k) => hasOwnProperty(k, props)); return propsToCheck.every((k) => props[k].is(a[k])); } return false; }, }; } //# sourceMappingURL=Partial.js.map