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

Function getLastItem

packages/react-stately/src/collections/getChildNodes.ts:47–54  ·  view source on GitHub ↗
(iterable: Iterable<T>)

Source from the content-addressed store, hash-verified

45}
46
47export function getLastItem<T>(iterable: Iterable<T>): T | undefined {
48 let lastItem: T | undefined = undefined;
49 for (let value of iterable) {
50 lastItem = value;
51 }
52
53 return lastItem;
54}
55
56export function compareNodeOrder<T>(
57 collection: Collection<Node<T>>,

Callers 5

getKeyRightOfMethod · 0.90
getKeyLeftOfMethod · 0.90
getLastKeyMethod · 0.90
useGridStateFunction · 0.90
getLastKeyMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected