Typed
Checks if the given value is a key of the given object. It is useful for narrowing down the type of a value.
Pass the object and the value to check. It will return a boolean indicating if the value is a key of the object.
import { isKeyOf } from 'radash'
const obj = {
a: 1,
b: 2,
c: 3,
}
isKeyOf(obj, 'a') // true
isKeyOf(obj, 'd') // false