MCPcopy Create free account
hub / github.com/adobe/react-spectrum / compare

Function compare

packages/react-stately/src/tokenfield/TokenFieldValue.ts:79–85  ·  view source on GitHub ↗
(a: Position, b: Position)

Source from the content-addressed store, hash-verified

77}
78
79function compare(a: Position, b: Position) {
80 if (a.index === b.index) {
81 return a.offset - b.offset;
82 }
83
84 return a.index - b.index;
85}
86
87enum Direction {
88 Forward = 1,

Callers 2

startMethod · 0.70
endMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected