您的位置:首页 > Web前端 > Node.js

推荐一个nodejs的promise库

2016-03-12 12:44 597 查看
http://bluebirdjs.com/docs/getting-started.html

Getting Started

This article is partially or completely unfinished. You are welcome to create pull requests to help completing this article.

Node.js

npm install bluebird

Then:

var Promise = require(“bluebird”);

Browsers

(See also Installation.)

There are many ways to use bluebird in browsers:

Direct downloads

Full build bluebird.js

Full build minified bluebird.min.js

Core build bluebird.core.js

Core build minified bluebird.core.min.js

You may use browserify on the main export

You may use the bower package.

When using script tags the global variables Promise and P (alias for Promise) become available. Bluebird runs on a wide variety of browsers including older versions. We’d like to thank BrowserStack for giving us a free account which helps us test that.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: