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

Function sortedClassNames

src/material/icon/icon.spec.ts:22–24  ·  view source on GitHub ↗

Returns the CSS classes assigned to an element as a sorted array.

(element: Element)

Source from the content-addressed store, hash-verified

20
21/** Returns the CSS classes assigned to an element as a sorted array. */
22function sortedClassNames(element: Element): string[] {
23 return element.className.split(' ').sort();
24}
25
26/**
27 * Verifies that an element contains a single `<svg>` child element, and returns that child.

Callers 1

icon.spec.tsFile · 0.85

Calls 1

sortMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…