finally-polyfill
A tiny ~150-byte polyfill for Promise.prototype.finally
.
Useful for browsers that support Promise but not the .finally()
method.
Usage
npm install finally-polyfill
It's a polyfill, so you can import
, require()
or drop it in a script tag - all the same.
import 'finally-polyfill';
Promise.reject('oops').finally(() => { /* ... */ })
<script src="/path/to/finally-polyfill.min.js"></script>
License
MIT
For developers who still need to support IE11 and Chrome 49, this is what you need!