Skip to content

build-your-own/TP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TP

logo

Build Status codecov

tiny + promise = TP

Describe

Implement the Promise A+ Spec. But all() and race are builted by myself and did not fit the proposed spec.

Usage

Same as official Promise API.

const TP = require('TP');

const tp = new TP((resolve, reject) => {
  setTimeout(() => {
    resolve('done!');
  }, 100);
});

tp.then(res => {
  console.log(res) // done!
});

Spec

Promises/A+

Promise Abstract Operations

About

Implement a tiny promise. Use Promiseaplus spec

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published