@pushkar8723/promise-polyfill
v1.0.1
Published
Created a polyfill for promise.
Readme
promise-polyfill
Created a polyfill for promise.
This is absolutely not required in production but is a great way to learn how to implement chaining design pattern.
How to use this
Add following lines to your main file
import Promise from '@pushkar8723/promise-polyfill';
// To make it available globally
if (typeof window.Promise === 'undefined') {
window.Promise = Promise;
}
// Use Promise
Promise.resolve('World').then((data) => console.log('Hello', data));Testing
npm i
npm run testBuilding
npm i
npm run build