Checks whether the supplied key is a known prototype pollution / object poisoning key.
These keys are blocked by forEachOwnKeySafe to prevent assigning dangerous values that can mutate object prototypes or constructor behavior.
The key to validate.
true if the key is a dangerous key (__proto__, constructor, prototype), otherwise false.
true
__proto__
constructor
prototype
false
0.14.0
isUnsafePropKey("__proto__"); // trueisUnsafePropKey("safeValue"); // false Copy
isUnsafePropKey("__proto__"); // trueisUnsafePropKey("safeValue"); // false
Checks whether the supplied key is a known prototype pollution / object poisoning key.
These keys are blocked by forEachOwnKeySafe to prevent assigning dangerous values that can mutate object prototypes or constructor behavior.