aurelia / polyfills

The minimal set of polyfills needed to run Aurelia.
MIT License
26 stars 27 forks source link

I'd like to add Object.values polyfill #54

Closed chdev77 closed 6 years ago

chdev77 commented 6 years ago

Using Object.values on IE 11 throws an error. 'Unhandled rejection TypeError: Object doesn't support property or method 'values''

I'd like to see something similar added, or at least make note of it.

const valuesPolyfill = function values (object) { return Object.keys(object).map(key => object[key]); };

gronostajo commented 6 years ago

According to repository's description, this library is "The minimal set of polyfills needed to run Aurelia." Object.values is super-useful, but I don't think it fits aurelia-polyfills.

By the way, take a look at existing polyfills for Object.values. They are more complex than what you proposed.

EisenbergEffect commented 6 years ago

My recommendation is that if you need that, find a suitable modularlized polyfill for just this feature and add it to your project. We want to be careful not to add more polyfills than Aurelia itself actually needs to run in older browsers.