node_modules.inflected.src.titleize.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apollo-client-maven-plugin Show documentation
Show all versions of apollo-client-maven-plugin Show documentation
Maven plugin for generating graphql clients
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());
});
}