bluebird README

The project's README from github.com/petkaantonov/bluebird. As one markdown file: README.md.

Promises/A+ logo

Build Status coverage-98%

Got a question? Join us on stackoverflow, the mailing list or chat on IRC

Introduction

Bluebird is a fully featured promise library with focus on innovative features and performance

See the bluebird website for further documentation, references and instructions. See the API reference here.

For bluebird 2.x documentation and files, see the 2.x tree.

⚠️Note⚠️

Please use native promises instead if at all possible. Native Promises have been stable in Node.js and browsers for around 10 years now and they have been fast for around 7. Any utility bluebird has like .map has native equivalents (like Node streams' .map).

This is a good thing, the people working on Bluebird and promises have been able to help incorporate most of the useful things from Bluebird into JavaScript itself and platforms/engines.

If there is a feature that keeps you using bluebird. Please let us know so we can try and upstream it :)

Currently - it is only recommended to use Bluebird if you need to support really old browsers or EoL Node.js or as an intermediate step to use warnings/monitoring to find bugs.

Questions and issues

The github issue tracker is only for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in StackOverflow under tags promise and bluebird.

Thanks

Thanks to BrowserStack for providing us with a free account which lets us support old browsers like IE8.

License

The MIT License (MIT)

Copyright (c) 2013-2021 Petka Antonov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bluebird (petkaantonov/bluebird)

Searching Database…

20.5K ·GitHub
这是什么?Bluebird 是一个功能完整的 JavaScript Promise 库,专注于性能和丰富的异步工具函数,它诞生于原生 Promise 还不具备这些功能的时候。
它是独立应用,还是我要加到项目里的库?它是一个 JavaScript 库,通过 npm 安装后,可以在 Node.js 中用 require/import 引入,也可以在浏览器中直接引入。
我要怎么把它加到项目里?用 npm 安装(npm install bluebird),然后在代码里 require 它;如果是在浏览器端使用,也可以直接用预先打包好的浏览器版本。
使用它需要什么特别的条件吗?没有列出任何外部依赖;只需要一个 JavaScript 运行环境,比如 Node.js 或浏览器。
现在还应该用它吗?README 明确建议尽可能改用原生 Promise,因为原生 Promise 在 Node.js 和浏览器中已经稳定、快速运行了多年;现在 Bluebird 只推荐用于旧版浏览器、已停止支持的 Node.js 版本,或者作为调试和监控的一个步骤。
这个库现在还适合哪些人?需要支持真正旧版浏览器(如 IE8)或已停止支持的 Node.js 版本的开发者,或者想借助额外的警告和监控工具,在迁移到原生 Promise 之前找出问题的开发者。
它在 Node.js 和浏览器里都能用吗?可以,它能在 Node.js 中运行,也提供浏览器版本;过去还借助 BrowserStack 测试,支持过 IE8 等旧版浏览器。
我可以在 GitHub 的 Issue 页面提问吗?不可以,Issue 页面只用于提交 bug 报告和功能请求;使用上的问题应该到 StackOverflow 上提问,并使用 promise 和 bluebird 标签。
有没有带独立文档的旧版本?有,Bluebird 2.x 的文档和文件保存在单独的 2.x 分支中。
我能构建一个只包含核心功能的更小的包吗?可以,构建脚本除了能生成完整的浏览器版本,还支持生成只包含最小「core」功能的浏览器版本。
What are similar projects?redux-thunk, q, core-js, axios, comlink, rxjs, react-loadable, koa
Size
15.1 MB
Stars
20.5K
Age
13y
Commits · 90 Days