All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.inflected.src.titleize.js Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
import humanize from "./humanize";
import underscore from "./underscore";

export default function titleize(word) {
  return humanize(underscore(word)).replace(/(^|[\s¿/]+)([a-z])/g, function(
    match,
    boundary,
    letter,
    idx,
    string
  ) {
    return match.replace(letter, letter.toUpperCase());
  });
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy