utils.js 240 B

1234567891011
  1. const _ = require('lodash');
  2. const notEmpty = (name) => (v) =>
  3. !v || v.trim() === '' ? `${name} is required` : true;
  4. const upperCamelCase = (text) => _.upperFirst(_.camelCase(text));
  5. module.exports = {
  6. notEmpty,
  7. upperCamelCase,
  8. };