MCPcopy Index your code
hub / github.com/angular/components / convertToDashCase

Function convertToDashCase

tools/example-module/generate-example-module.ts:72–76  ·  view source on GitHub ↗

Converts a given camel-cased string to a dash-cased string.

(name: string)

Source from the content-addressed store, hash-verified

70
71/** Converts a given camel-cased string to a dash-cased string. */
72function convertToDashCase(name: string): string {
73 name = name.replace(/[A-Z]/g, ' $&');
74 name = name.toLowerCase().trim();
75 return name.split(' ').join('-');
76}
77
78/**
79 * Analyzes the examples by parsing the given TypeScript files in order to find

Callers 1

analyzeExamplesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…