1.0.0 • Published 12 months ago

@pushkar8723/promise-polyfill v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

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 test

Building

npm i
npm run build

Edit in StackBlitz next generation editor ⚡️

1.0.0

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago