Closed zewa666 closed 6 years ago
With ES2017 there is Object.entries which is not yet covered by aurelia polyfills. It would be great if we could add that as well.
Object.entries
I'm just not certain where to add this, since there are no ES2017 polyfills prepared yet if I'm not wrong.
Polyfill: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries#Polyfill
if (!Object.entries) Object.entries = function( obj ){ var ownProps = Object.keys( obj ), i = ownProps.length, resArray = new Array(i); // preallocate the Array while (i--) resArray[i] = [ownProps[i], obj[ownProps[i]]]; return resArray; };
You could add it here: https://github.com/aurelia/polyfills/blob/master/src/object.js
Closed due to discussion in linked PR
With ES2017 there is
Object.entries
which is not yet covered by aurelia polyfills. It would be great if we could add that as well.I'm just not certain where to add this, since there are no ES2017 polyfills prepared yet if I'm not wrong.
Polyfill: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries#Polyfill