UNPKG

apeman-app-rest

Version:
18 lines (12 loc) 357 B
/** * Get response name of a model. * @function responseOfModel */ 'use strict' const pluralize = require('pluralize') const stringcase = require('stringcase') /** @lends responseOfModel */ function responseOfModel (name, action) { return `${stringcase.pascalcase(name)}${stringcase.pascalcase(action)}Response` } module.exports = responseOfModel