MCPcopy Index your code
hub / github.com/adobe/react-spectrum / normalizeKey

Function normalizeKey

packages/react-aria/src/listbox/utils.ts:31–37  ·  view source on GitHub ↗
(key: Key)

Source from the content-addressed store, hash-verified

29>();
30
31function normalizeKey(key: Key): string {
32 if (typeof key === 'string') {
33 return key.replace(/\s*/g, '');
34 }
35
36 return '' + key;
37}
38
39export function getItemId<T>(state: ListState<T>, itemKey: Key): string {
40 let data = listData.get(state);

Callers 1

getItemIdFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected