Assert that input is a valid property key: a string, number, or symbol.
Parameters
input: unknown
error: string|Error = 'input is not a property key'
Returns assertsinputisPropertyKey
Example
assertIsPropertyKey('key'); // does not throw assertIsPropertyKey(42); // does not throw assertIsPropertyKey(Symbol('key')); // does not throw assertIsPropertyKey({}); // throws TypeError: input is not a property key
Assert that
inputis a valid property key: a string, number, or symbol.