- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2k
Closed
Labels
🚨This issue needs some love.This issue needs some love.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
The use of the delete operator has performance negative effects for the V8 hidden classes pattern.
In general it's recommended do not use it.
Alternatively, to remove object own enumerable properties, we could create a new object copy without those properties (example using lodash):
_.omit(o, 'prop', 'prop2')Or even define the property value to null or undefined (which is implicitly ignored when serializing to JSON):
o.prop = undefinedvmishragreprubycom, preco21, LeonDWong, kshateesh, Ivan-Korolenko and 3 more
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.