code: function matchAllowedLocalAction(text, allowedActions, actionPatterns) {
    const matched = matchAction(text, allowedActions, actionPatterns);
  
    if (matched) {
      // back command doesn't require a target
      if (matched.action === actions.back) {
        delete matched.objectName;
        return matched;
      }
  
      // Match returns empty string if command doesn't capture any objects
      if (matched.objectName === '') {
        // TODO: This section looks sketchy. Need to refactor
        if (allowedActions[matched.action].length == 1) {
          matched.object = allowedActions[matched.action][0];
        }
      } else {
        allowedActions[matched.action].forEach(object => {
          object.names.forEach(name => {
            if (name === matched.objectName) {
              matched.object = object;
            }
          })
        });
      }
  
      if (matched.action && matched.object) {
        delete matched.objectName;
        return matched;
      }
    }
  
    return undefined;
  }
docs: Sample structure of allowedActions param:
  {
  [character.use]:     [ object1, object2 ]
  [character.examine]: [ object1, object2 ],
  [character.back]:  true
  }