Use Object.create(null); to create frozen/sealed objects
Closed this issue · 4 comments
graingert commented
That way messing with Object.prototype would not effect these new object literals
keithamus commented
Agreed. This is in the plan for future changes to this spec
graingert commented
@keithamus where is the plan?
keithamus commented
Sorry @graingert. Plan is in my head. I'll be making changes soon to this proposal, but for now I'd happily accept a PR to change the existing examples - like those two commits you have (except I'd prefer to see the paths inline rather than as functions)
graingert commented
@keithamus babel supports helper functions, and with tranform runtime they are moved into imports, that way the code is much smaller