* Allow rest/spread on polyfilled or builtin iterables when `Symbol` unsupported Currently, when `Symbol` is not supported, we allow using rest/spread with: - arrays - strings - arguments With this PR, it will be also possible to use it with - maps - sets - binary arrays While in old browsers es6 builtins would still need to be polyfilled, it's way easier to polyfill them because `Symbol` cannot be reliably polyfilled. I didn't use `instanceof` becase: - it doesn't work with polyfills not attatched to the global scope - when using Babel to load polyfills, it would force the inclusion of `Map` and `Set` polyfills even if they are not used Downside: the current approach of relying on `toString || construcor.name` doesn't work with subclasses. * Don't use Array.from for array-like objects
@babel/runtime-corejs2
babel's modular runtime helpers with core-js@2 polyfilling
See our website @babel/runtime-corejs2 for more information.
Install
Using npm:
npm install --save-dev @babel/runtime-corejs2
or using yarn:
yarn add @babel/runtime-corejs2 --dev