MCPcopy
hub / github.com/tldraw/tldraw / last

Function last

packages/utils/src/lib/array.ts:102–104  ·  view source on GitHub ↗
(arr: readonly T[])

Source from the content-addressed store, hash-verified

100 * @internal
101 */
102export function last<T>(arr: readonly T[]): T | undefined {
103 return arr[arr.length - 1]
104}
105
106/**
107 * Find the item in an array with the minimum value according to a function.

Callers 15

array.test.tsFile · 0.90
getConstrainedCameraMethod · 0.90
zoomInMethod · 0.90
zoomToBoundsMethod · 0.90
clampZoomMethod · 0.85
getGeometryMethod · 0.85
getHighlightStrokePointsFunction · 0.85
HighlightRendererFunction · 0.85
getIndicatorPathMethod · 0.85
DrawShapeSvgFunction · 0.85
startShapeMethod · 0.85
updateDrawingShapeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…