chensenlai 10988628a0 语音房项目初始化 5 years ago
..
dist 10988628a0 语音房项目初始化 5 years ago
src 10988628a0 语音房项目初始化 5 years ago
test 10988628a0 语音房项目初始化 5 years ago
.npmignore 10988628a0 语音房项目初始化 5 years ago
.travis.yml 10988628a0 语音房项目初始化 5 years ago
README.md 10988628a0 语音房项目初始化 5 years ago
bower.json 10988628a0 语音房项目初始化 5 years ago
browser-source.js 10988628a0 语音房项目初始化 5 years ago
gulpfile.js 10988628a0 语音房项目初始化 5 years ago
nextTick.js 10988628a0 语音房项目初始化 5 years ago
package.json 10988628a0 语音房项目初始化 5 years ago
setImmediate.js 10988628a0 语音房项目初始化 5 years ago
setTimeout.js 10988628a0 语音房项目初始化 5 years ago

README.md

easy-promise

Pnly Promises/A+ implementation If you want to make a more powerful Promise class, it is recommended to use the extend-promise extension.

API

  • new Promise
  • Promise.defer
  • Promise.resolve
  • Promise.reject
  • .then

Install

npm
npm install easy-promise
bower
bower install easy-promise

Use

//Internal use of process.nextTick
var Ep = require('esay-promise')

//or Use setImmediate ,Used For high concurrency scenarios
var Ep = require('esay-promise/setImmediate')

//or setTimeout , Used for browser projects
var Ep = require('esay-promise/setTimeout')

In the no Promise browser

  • dist/easy-Promise.js (gzip 1.8k)
  • dist/easy-Promise.min.js (gzip 1.2k)