MCPcopy Create free account
hub / github.com/dfinity/orbit / capitalize

Function capitalize

cli/src/utils.ts:38–39  ·  view source on GitHub ↗
(str: string, lower = false)

Source from the content-addressed store, hash-verified

36};
37
38export const capitalize = (str: string, lower = false) =>
39 (lower ? str.toLowerCase() : str).replace(/(?:^|\s|["'([{])+\S/g, match => match.toUpperCase());
40
41export const targetExists = (project: string, target: string): boolean => {
42 const output = execSync(`npx nx show projects --withTarget="${target}" -p "${project}"`)

Callers 1

publish.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected