UNPKG

@commodo/fields

Version:

Enables defining rich data models by decorating function instances with specified model fields. Additionally, it adds `populate` and `validate` methods, for populating model instances with data, and then validating it, respectively.

26 lines (21 loc) 450 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _repropose = require("repropose"); const onGet = callback => { return (0, _repropose.withProps)(props => { const { getValue } = props; return { getValue() { return callback(getValue.call(this)); } }; }); }; var _default = onGet; exports.default = _default; //# sourceMappingURL=onGet.js.map