Asserts whether an object has at least one of the specified keys (using the in operator, unwrapping Proxies if present). Safe against null, undefined, and non-object primitives.
in
The target object to inspect
Candidate property keys to verify, including inherited properties
True if the target contains at least one of the specified keys; false if no keys are provided or obj is not an object
Errors from proxy traps or getters used while unwrapping or checking keys propagate to the caller.
if (hasAnyOf(arg, 'install', 'define')) { ... } Copy
if (hasAnyOf(arg, 'install', 'define')) { ... }
Asserts whether an object has at least one of the specified keys (using the
inoperator, unwrapping Proxies if present). Safe against null, undefined, and non-object primitives.