@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.
30 lines (24 loc) • 511 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _repropose = require("repropose");
const setOnce = () => {
return (0, _repropose.withProps)(props => {
const {
setValue
} = props;
return {
setValue(value) {
if (this.state.set) {
return;
}
return setValue.call(this, value);
}
};
});
};
var _default = setOnce;
exports.default = _default;
//# sourceMappingURL=setOnce.js.map