Check if an object has a property.
检查一个对象是否有属性。
The type of elements in the array / 数组元素的类型
The object to check. 要检查的对象
The key to check for. 要检查的键
True if the object has the property, false otherwise. 如果对象具有该属性则返回 true,否则返回 false
isKeyof({ a: 1, b: 2 }, 'a') // => trueisKeyof({ a: 1, b: 2 }, 'c') // => false Copy
isKeyof({ a: 1, b: 2 }, 'a') // => trueisKeyof({ a: 1, b: 2 }, 'c') // => false
Check if an object has a property.
检查一个对象是否有属性。