Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 904 Bytes

README.md

File metadata and controls

36 lines (23 loc) · 904 Bytes

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