Function deleteProperty
-
Parameters
- data: object
Object containing the property path.
- path: PropertyPath
Dotted or exact property-key path.
Optionaloptions: { hasOwnOnly?: boolean }Deletion options.
-
OptionalhasOwnOnly?: booleanWhether every path segment must be an own property; default:
true.
-
Returns boolean
Whether an existing configurable property was deleted.
- data: object
Deletes the property resolved by a property path.
By default, every path segment must be an own property. Set
hasOwnOnlytofalseto permit inherited traversal; when the final property is inherited, the property is deleted from the prototype object that owns it. This explicit opt-in prevents accidental prototype mutation during ordinary use.Prototype-pollution keys (
__proto__,prototype, andconstructor) and ECMAScript well-known symbols are rejected at every path segment, matching the mutation hardening applied by safeSet. Non-configurable properties are not deleted.