index.js
function(roles) {
    roles = roles || ['*'];
    if (!Array.isArray(roles)) {
      roles = [roles];
    }
    if (roles.indexOf('*') === -1) roles.push('*');
    var actions = [];
    _.each(roles, function(role) {
      if (_.has(this.permissions, role)) {
        actions = actions.concat(this.permissions[role]);
      }
    }, this);
    return _.uniq(actions);
  }
function(roles) {
    roles = roles || ['*'];
    if (!Array.isArray(roles)) {
      roles = [roles];
    }
    if (roles.indexOf('*') === -1) roles.push('*');
    var actions = [];
    _.each(roles, function(role) {
      if (_.has(this.permissions, role)) {
        actions = actions.concat(this.permissions[role]);
      }
    }, this);
    return _.uniq(actions);
  }
Returns a list of actions given role(s) have access to
@param  {String|Array} roles
@return {Array} list of actions