MCPcopy Create free account
hub / github.com/angular/components / sortDirectives

Function sortDirectives

src/aria/private/utils/element.ts:16–20  ·  view source on GitHub ↗
(a: HasElement, b: HasElement)

Source from the content-addressed store, hash-verified

14 * Sort directives by their document order.
15 */
16export function sortDirectives(a: HasElement, b: HasElement) {
17 return (a.element.compareDocumentPosition(b.element) & Node.DOCUMENT_POSITION_PRECEDING) > 0
18 ? 1
19 : -1;
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected