too complex
Closed this issue · 3 comments
ancms2600 commented
why not simply
Object.prototype.entries || Object.defineProperty(Object.prototype, 'entries', { // shim
enumerable: false,
value: function() { return Object.keys(this).map(k=>[k,this[k]]); }
});
ljharb commented
Because then it would violate the spec. Every single line of code in the implementation is absolutely required for spec compliance.
ljharb commented
If you try it out locally, you’ll see how many tests fail.