UNPKG

ow

Version:

Function argument validation for humans

11 lines (10 loc) 258 B
import predicates from './predicates.js'; const modifiers = (object) => { Object.defineProperties(object, { optional: { get: () => predicates({}, { optional: true }), }, }); return object; }; export default modifiers;