const obj = {
height: 500,
width: 300,
_dasgdsa: '321321',
onActive: function() { return false; },
onClick: function() {},
hasKey: false,
elementRef: { element: {}, children: [] },
hint: 'bla-bla-bla',
isEnabled: true,
isVisible: true,
className: 'box',
addChild: function() { return true; },
accKey: 'dasdadasdasd#132132121dsadaf#easedada',
};
const obj2 = { obj };
['height', 'width', '_dasgdsa', 'onActive', 'onClick', 'hasKey', 'elementRef', 'hint', 'isEnabled', 'isVisible'].forEach(prop => delete obj2[prop]);
const {
height,
width,
_dasgdsa,
onActive,
onClick,
hasKey,
elementRef,
hint,
isEnabled,
isVisible,
obj2,
} = obj;
--enable-precise-memory-info
flag.
Test case name | Result |
---|---|
Delete | |
Destructure |
This benchmark does not have any results yet. Be the first one to run it!