MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / sortEvents

Function sortEvents

src/lib/command/util/history.ts:29–29  ·  view source on GitHub ↗
(list: DeviceActivity[])

Source from the content-addressed store, hash-verified

27 date ? (date.match(/^\d+$/) ? Number(date) : new Date(date).getTime()) : undefined
28
29export const sortEvents = (list: DeviceActivity[]): DeviceActivity[] => list.sort((a, b) => b.epoch - a.epoch)
30
31export const getNextDeviceEvents = (
32 table: Table,

Callers 2

writeDeviceEventsTableFunction · 0.85
history.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected