question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Array.prototype.flat polyfill is missing

See original GitHub issue

Hello, I’m using "ember-cli-babel": "^7.7.3"

array.flat in Edge browser throws an error, while array.flatMap is working.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pzuraqcommented, Aug 23, 2019

One option is to use https://github.com/pzuraq/ember-cli-babel-polyfills, just updated it to use the latest core-js and confirmed it has Array.flat, plus it ensures that the polyfills are only included in legacy browsers by using nomodule, so modern users don’t pay the cost 😄

0reactions
dbashfordcommented, Aug 28, 2019

That gets flat in (via core-js/stable), if I was interested in all the esnext stuff as well, should I just be importing core-js myself? Or might that be something ember-cli-babel-polyfills or eventually ember-cli-babel may support?

Read more comments on GitHub >

github_iconTop Results From Across the Web

array.prototype.flat
An ES2019 spec-compliant `Array.prototype.flat` shim/polyfill/replacement that works as far down as ES3.. Latest version: 1.3.1, ...
Read more >
array.prototype.flat is undefined in nodejs - javascript
Now I am wondering what other methods are not in the node RTE and where the documentation of global Objects like Array is....
Read more >
Array.prototype.flat() - JavaScript - MDN Web Docs
The flat() method creates a new array with all sub-array elements concatenated into it recursively up to the specified depth.
Read more >
tiny-array-flat-polyfill - npm package
138b polyfill for Array.prototype.flat() and Array.prototype.flatMap() ... Looks like tiny-array-flat-polyfill is missing a security policy.
Read more >
babel/polyfill
assign , instance methods like Array.prototype.includes , and generator functions (provided you use the regenerator plugin). The polyfill adds to the global ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found