function buildMatcher(str) {
  if (isRegExp(str)) {
    const regex = toRegExp(str)
    return (s) => regex.test(s)
  }
  return (s) => s === casing.pascalCase(str) || s === casing.kebabCase(str)
}
@param {string} str
@returns {(str: string) => boolean}
@private