# d-promise

> a light-weight implementations of Promises/A+

Latest version **1.0.0** (published 2016-03-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install d-promise
pnpm add d-promise
yarn add d-promise
bun add d-promise
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-03-21 |
| First published | 2016-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | NailMan |
| Maintainers | doingnothing |
| Keywords | promise, light-weight promise |

## Links

- npm: https://www.npmjs.com/package/d-promise
- Repository: https://github.com/doingnothing/P
- Homepage: https://github.com/doingnothing/P#readme
- Issues: https://github.com/doingnothing/P/issues
- npm.io page: https://npm.io/package/d-promise

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-03-21

## README

# DPromise

DPromise是Promises/A+规范的一个实现，并且通过了Promises/A+的测试。

DPromise是一个精简小巧的，可读性高的Promises/A+实现。如你在使用中遇到问题，欢迎联系我：lehuading@qq.com

## 安装

```sh
$ npm install d-promise
```

## 测试

```sh
// 安装promises-aplus-tests
$ npm install
// 运行测试
$ npm test
```

## 文档

### 使用

```js
var DPromise = require('d-promise');
new DPromise(function (resolve, reject) {
    setTimeout(function () {
        resolve('success')
    }, 1000);
}).then(function (value) {
    // resolved
    console.log(value);
}, function (reason) {
    // rejected
    console.log(reason);
});
```

### 接口

DPromise实现了一个符合Promise/A+规范的最小库。
为了简化流程处理，今后会添加串行、并行和一些约定俗成的接口。
如果你想一起来开发，欢迎和我联系：lehuading@qq.com。

<a href="http://promises-aplus.github.com/promises-spec">
    <img src="http://promises-aplus.github.com/promises-spec/assets/logo-small.png"
         align="right" alt="Promises/A+ logo" />
</a>

## Promises/A+ 规范

Promises/A+ 规范[英文]: https://github.com/promises-aplus/promises-spec

Promises/A+ 规范[中文]: http://www.ituring.com.cn/article/66566

感谢malnote的翻译[博客]: http://malcolmyu.github.io/malnote

## License

[MIT](https://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/d-promise · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
