Skip to main content
Version: v9.0.0

isOptimisticMatch

Tells if the item is selected by the match. Plain values are compared with the key field of the item, numbers and strings match each other the same way route params do ( "1" matches 1 ).


Import
import { isOptimisticMatch } from "@hyper-fetch/core"

Parameters​

isOptimisticMatch(item: unknown, match: unknown, key: PropertyKey)
Parameters
NameTypeDescription
item
unknown
match
unknown
key
PropertyKey

Returns​

boolean