proposal-promise-finally | ECMAScript Proposal , specs , and reference | Reactive Programming library

 by   tc39 HTML Version: Current License: MIT

kandi X-RAY | proposal-promise-finally Summary

kandi X-RAY | proposal-promise-finally Summary

proposal-promise-finally is a HTML library typically used in Programming Style, Reactive Programming applications. proposal-promise-finally has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

ECMAScript Proposal, specs, and reference implementation for Promise.prototype.finally. Spec drafted by @ljharb, following the lead from the cancelable promise proposal. Get the polyfill/shim on npm. This proposal is currently stage 4 of the process.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              proposal-promise-finally has a low active ecosystem.
              It has 277 star(s) with 27 fork(s). There are 176 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 28 have been closed. On average issues are closed in 54 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of proposal-promise-finally is current.

            kandi-Quality Quality

              proposal-promise-finally has no bugs reported.

            kandi-Security Security

              proposal-promise-finally has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              proposal-promise-finally is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              proposal-promise-finally releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of proposal-promise-finally
            Get all kandi verified functions for this library.

            proposal-promise-finally Key Features

            No Key Features are available at this moment for proposal-promise-finally.

            proposal-promise-finally Examples and Code Snippets

            No Code Snippets are available at this moment for proposal-promise-finally.

            Community Discussions

            QUESTION

            What was the reasoning behind not special-casing a resolved value of undefined from Promise#finally?
            Asked 2019-May-09 at 18:20
            Background

            The TC39 proposal-promise-finally, which is now part of the ES2018 specification, lists the following key points also paraphrased on MDN to describe exactly what the method does.

            promise.finally(func) is similar to promise.then(func, func), but is different in a few critical ways:

            • When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it
            • A finally callback will not receive any argument, since there's no reliable means of determining if the promise was fulfilled or rejected. This use case is for precisely when you do not care about the rejection reason, or the fulfillment value, and so there's no need to provide it.
            • Unlike Promise.resolve(2).then(() => {}, () => {}) (which will be resolved with undefined), Promise.resolve(2).finally(() => {}) will be resolved with 2.
            • Similarly, unlike Promise.reject(3).then(() => {}, () => {}) (which will be resolved with undefined), Promise.reject(3).finally(() => {}) will be rejected with 3.

            However, please note: a throw (or returning a rejected promise) in the finally callback will reject the new promise with that rejection reason.

            In other words, a concise polyfill using a Promise implementation that conforms to the Promises/A+ specification is as follows (based on the answers by @Bergi and @PatrickRoberts).

            ...

            ANSWER

            Answered 2019-May-09 at 18:20

            This demonstrates that the semantics for the settled state of the resulting promise differ from the analogue try...finally block.

            Not really, you just used the "wrong" try/finally syntax in your comparison. Run it again with

            Source https://stackoverflow.com/questions/56064081

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install proposal-promise-finally

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/tc39/proposal-promise-finally.git

          • CLI

            gh repo clone tc39/proposal-promise-finally

          • sshUrl

            git@github.com:tc39/proposal-promise-finally.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link