@nevware21/ts-utils
    Preparing search index...

    Function isUnsafePropKey

    • 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.

      Parameters

      • key: PropertyKey

        The key to validate.

      Returns boolean

      true if the key is a dangerous key (__proto__, constructor, prototype), otherwise false.

      0.14.0

      isUnsafePropKey("__proto__");   // true
      isUnsafePropKey("safeValue"); // false