MCPcopy Create free account
hub / github.com/serverless/examples / toTitleCase

Function toTitleCase

generate-readme.js:6–10  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

4const markdownMagic = require("markdown-magic"); // eslint-disable-line
5
6const toTitleCase = (str) =>
7 str.replace(
8 /\w\S*/g,
9 (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
10 );
11
12const formatPluginName = (string) => toTitleCase(string.replace(/-/g, " "));
13

Callers 1

formatPluginNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected