MCPcopy Create free account
hub / github.com/Effect-TS/effect / humanize

Function humanize

packages/effect/src/unstable/cli/internal/wizard.ts:213–217  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

211}
212
213const humanize = (name: string): string => {
214 const words = name.split(/[-_]+/).filter((word) => word.length > 0)
215 if (words.length === 0) return name
216 return [words[0][0].toUpperCase() + words[0].slice(1), ...words.slice(1)].join(" ")
217}
218
219const logCurrentCommand = (commandLine: ReadonlyArray<string>): Effect.Effect<void> =>
220 Console.log(renderCommandBlock("Current command", commandLine, Ansi.magenta))

Callers 1

renderParamLabelFunction · 0.85

Calls 3

filterMethod · 0.80
joinMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected