UNPKG

ndut-role

Version:

Role & Permission for Ndut Framework

6 lines (5 loc) 230 B
module.exports = function (rule) { const { _ } = this.ndut.helper const method = _.isArray(rule.method) ? rule.method.join(' ') : rule.method return _.camelCase(`${method} ${rule.inverted ? 'inverted' : ''} ${rule.path}`) }