# p0

> Minimal Promise/A+ implementation.

Latest version **0.1.3** (published 2014-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install p0
pnpm add p0
yarn add p0
bun add p0
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2014-07-21 |
| First published | 2013-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Artur Burtsev |
| Maintainers | artjock |
| Keywords | defer, deferred, promise, promise/A+, A+, aplus |

## Links

- npm: https://www.npmjs.com/package/p0
- Repository: https://github.com/artjock/p0
- Issues: https://github.com/artjock/p0/issues
- npm.io page: https://npm.io/package/p0

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@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

## Recent versions

- 0.1.3 (latest) — 2014-07-21
- 0.1.2 — 2014-07-06
- 0.1.1 — 2014-05-08
- 0.1.0 — 2014-05-05
- 0.0.6 — 2014-04-04
- 0.0.5 — 2014-04-04
- 0.0.4 — 2014-03-21
- 0.0.3 — 2013-10-18
- 0.0.2 — 2013-07-09
- 0.0.1 — 2013-06-20
- 0.0.0 — 2013-06-19

## README

<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>
p0 [![build status](https://secure.travis-ci.org/artjock/pzero.png)](http://travis-ci.org/artjock/p0)
==

Minimal and fast Promise/A+ 1.1 implementation. It's all you need to pass the [tests](https://github.com/promises-aplus/promises-tests) and build your own [extended API](https://github.com/artjock/pzero).

### Installation

#### Node.js
```
npm install p0
```

#### Browser
```
<script src="p0/index.min.js"></script>
```

### Usage

```javascript
var p0 = require('./');

var promise1 = new p0();

var promise2 = promise1.then(
    null,
    function(reason) {
        var promise3 = new p0();
        setTimeout(function() {
            promise3.fulfill(reason + 'bar');
        }, 100);
        return promise3;
    }
);

promise1.reject('foo');

promise2.then(function(value) { console.log(value); });
// will output "foobar" after 100ms
```

Fill free to use [specs](http://promisesaplus.com/) as more descriptive documentation.

### License
MIT

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