I don't believe babeljs will include many polyfills for actual browser features aside from Class; it mainly does syntax transpiling. https://polyfill.io/v2/docs/ Polyfill service, E.g. It's a service which accepts a request for a set of browser features and returns only the polyfills that are needed by the requesting browser. I use core-js to polyfill promise, Array.from/find/includes, and Object.assign in my apps.

It passes both Promises/A+ test suite and rsvp.js test suite. Instantly share code, notes, and snippets. You signed in with another tab or window. Get a bundle of polyfills which have been minified ready for production website use. Pretty much everyone using es6 is doing it with babel at this point.

Then you just deliver a transpiled version of your JS if the browser is IE. If you have code written as ES6 and you would like to run it in older browsers, could a solution like using Babel to transpile that code down JavaScript written using features that older browsers understand (before loading it in the browser) lead to better performance in those older browsers?

Yeah maybe, but they wouldn't slow down more modern browsers, right? The implementation based on Jake Archibald implementation a subset of rsvp.js. There are lots of differing browsers and browser versions in use throughout the world, each one has a slighly different set of features to the rest. That's not an unpopular opinion.. The implementation based on Jake Archibald implementation a subset of rsvp.js. There is a polyfill project called Polyfill.io API that can polyfill ES6 code client side. So option 1 is impossible. #from(arrayLike [ , mapfn [ , thisArg ] ]).

GitHub Gist: instantly share code, notes, and snippets.

You will have to parse the user-agent and add a build-step to your CI. © The Financial Times Ltd, Jonathan Neal and other contributors FT and 'Financial Times' are trademarks of The Financial Times Ltd. © The Financial Times Ltd, Jonathan Neal and other. Older version of IE not only lack support for modern JavaScript features, but also have much slower JavaScript engines in them.

If you're wanting extra features and more debugging options, check out the full library. At the time of this post, Microsoft is rewriting Edge to be a chromium-based browser, which helps with cross-browser JavaScript discrepancies, but folks may not have upgraded Edge just yet. I've just made a new site using ES6 throughout, but when I went to test it on something other than Chrome/FF (read: IE11 & Safari / iOS) it's throwing syntax errors for 'promise' and 'class'. The main target: implementation should be conformance with browser's implementations and to be minimal as possible in size. ES6 Promise polyfill. Omitting or setting to an empty string is equivalent to the value "default", which is an alias for a curated list of polyfills. Return a new function that, when called, has its this keyword set to the provided value. This is not always an option. This endpoint responds with a JavaScript file containing the polyfills which should be served to the requesting browser.

FYI, one issue I noticed is your implementation of Promise.all doesn't wrap non-promise values in a Promise like native Promise.all does. // dispatch onFulfilled and onRejected handlers asynchronously, // Forward the result of promise1 to promise2, if resolution handlers, // If the promise has resolved already, dispatch the appropriate handlers asynchronously, // TODO use MutationObservers or something to simulate setImmediate, 'A promise\'s fulfillment handler cannot return the same promise', // rejects with: TypeError: promises[i].then is not a function, // if this were a native `Promise.all`, it would log '[1, 2, 3]'. Here's an overview of the difference between them: Returns an array of a given object's own enumerable properties. es6-promise-auto 27.78 KB (7.3 KB gzipped) - Automatically provides/replaces Promiseif missing or broken. The latest versions of the popular browsers can do lots of things which older browsers can not – but you may still have to support the older browsers. It really is wonderful.

Basically, I need a polyfill. Well, how much does it require? ES6 Promise polyfill. It's pretty clear in the angular link you posted: "Angular is built on the latest standards of the web platform. They support ES6, so can’t we give them ES6.

I am glad you look into the 3rd sources to understand what you need. The table … Polyfill.io makes it simpler to support differing browsers by attempting to recreate the missing features with polyfills: You can make use of the latest and greatest features in browsers which support them, and in those that do not. If you are writing your JavaScript using ES6 or ES5, then you are probably using some polyfills to be able to target old browsers (or Microsoft Edge). The polyfill is provided as a convenience but you should use it with @babel/preset-env and the useBuiltIns option so that it doesn't include the whole polyfill which isn't always needed. Probably because angular relies on some ES6 features that need those polyfills.