Git Product home page Git Product logo

Comments (7)

triskweline avatar triskweline commented on June 2, 2024 1

The reason why es-shims/Promise.allSettled has such a huge bundle size is that they're bundling a lot of dependencies.

Here is a polyfill in 218 bytes.

Would love to see this in es6-promise, which is my favorite promise polyfill ❤️

from es6-promise.

triskweline avatar triskweline commented on June 2, 2024 1

As a long-time user of this package, it never occured to me that it its features could be scoped to ES2015. I guess it's because we've been using "ES6" as an inaccurate alias for "the time when we got new JavaScript features" for so long.

In any case, other packages I use have started to use allSettled, and they rarely make the destinction between ES levels. They just assume window.Promise is supported with the current promise features. If this package would remain scoped to ES2015, I could no longer use it as an effective IE11 polyfill.

from es6-promise.

andreyvolokitin avatar andreyvolokitin commented on June 2, 2024

I just checked the bundle size for es-shims/Promise.allSettled and it's 31.5 kB (es6-promise is 6.2 kB). I'm not sure if it will weight less if reimplemented here, but the bundle size of es-shims/Promise.allSettled was definitely the reason I didn't use it in my project

from es6-promise.

stefanpenner avatar stefanpenner commented on June 2, 2024

Wow thats pretty large.

from es6-promise.

stefanpenner avatar stefanpenner commented on June 2, 2024

This project is named es6-promise, and es6 doesn't have all-settled, or other new features.

If there is enough demand, we can create a different polyfil. But it is unclear if adding it here, given the name, makes sense.

Thoughts?

from es6-promise.

andreyvolokitin avatar andreyvolokitin commented on June 2, 2024

I don't think much people rely on the fact that ES2015 doesn't contain allSettled. I personally expect from a polyfill a "full support" (whatever this could mean). But overall can't judge if the name is a deciding factor in this situation. A different polyfill definitely wouldn't hurt, but it could be a split effort for almost same thing.

I guess changing this project name isn't an option?

from es6-promise.

WormGirl avatar WormGirl commented on June 2, 2024

I implemented this method https://github.com/WormGirl/core-promise

from es6-promise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.