code: function trueOrMatch(needle, haystack) {
    if (needle === true) {
      return true;
    }
    if (_.isRegExp(needle) && needle.test(haystack)) {
      return true;
    }
    if (_.isString(needle) && haystack.indexOf(needle) !== -1) {
      return true;
    }
    if (needle instanceof Array) {
      for (var i in needle) {
        if (trueOrMatch(needle[i], haystack)) {
          return true;
        }
      }
    }
    return false;
  }
docs: A helper function to test whether an option was set to true or the value matches the options regular expression.
  @param {boolean|string|RegExp} needle
  @param {String} haystack
  @returns {boolean}