Skip to main content

findTimeContextualMatch

Stentor API Reference


Stentor API Reference / stentor-time/src / findTimeContextualMatch

Function: findTimeContextualMatch()

findTimeContextualMatch<T>(objects, context?): TimeContextual<T> | undefined

Defined in: packages/stentor-time/src/findTimeContextualMatch.ts:14

Find the best time contextual match from the provided objects.

Type Parameters​

T​

T extends object

Parameters​

objects​

(T | TimeContextual<T>)[]

context?​

lastActiveTimestamp​

number | undefined

Returns​

TimeContextual<T> | undefined

Returns the best match or undefined if no match is found.