habits-cli
Version:
The habits application seeks to help individuals build up healthy habits.
17 lines (16 loc) • 440 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.validator = void 0;
var utils_1 = require("../../utils");
var validator = function (schema) {
return function (value) {
try {
schema.validateSync(value);
return true;
}
catch (error) {
return utils_1.stringParser.capitalize(error.message);
}
};
};
exports.validator = validator;