Skip to content

AkshayIyer12/promisesLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

promisesLib

A basic implementation of JavaScript Promises. Implemented with reference to:

  1. Promises/A+ Spec
  2. q Designs
  3. Promise Core

How to require MyPromise?

require('./lib/myPromise')

How to use the methods to core MyPromise?

require('./lib/myPromiseMethods') Do keep in mind to require the core MyPromise as well.

How to create a MyPromise?

new MyPromise(function (resolve, reject) {})

What in-built functions does it have?

  • then()
  • catch()

What all methods are available?

  • MyPromise.all()
  • MyPromise.resolve()
  • MyPromise.reject()

Does it support chaining?

Yes, it supports chaining.

Do you have examples for the above implementation of Promise?

MyPromise Examples

Found a bug!

Issue Format:

Issue: Give a one line description of the issue.
Description: Exlain the issue over here, try to keep it to the point.
Sample Code: Source Code link in which you found the issue.

File an issue at Issues May the source be with you.

Want to contribute

Send a PR at Pull Requests Happy Coding! The force is strong in you.

About

Understanding Promises by writing my own promise.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published