Skip to content

Commit

Permalink
Update README and version.
Browse files Browse the repository at this point in the history
  • Loading branch information
mudge committed Jan 23, 2014
1 parent 130b9d9 commit 986ee79
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pacta [![Build Status](https://travis-ci.org/mudge/pacta.png?branch=master)](https://travis-ci.org/mudge/pacta)

```javascript
{ 'pacta': '0.4.0' }
{ 'pacta': '0.5.0' }
```

```shell
Expand Down Expand Up @@ -265,8 +265,9 @@ promise.mapError(function (x) {
}); //=> Rejected promise with "Error: Type error at line 214" as reason
```

Execute a function `f` on the reason of the promise. This returns a new
rejected promise containing the result of applying `f` to the initial promise's reason.
Execute a function `f` on the reason of a rejected promise. This returns a new
rejected promise containing the result of applying `f` to the initial
promise's reason.

In [Haskell](http://www.haskell.org) notation, its type signature is:

Expand Down Expand Up @@ -425,9 +426,9 @@ getMessage()
.mapError(console.error);
```

Execute a function `f` with the reason of the promise. This differs from
[`Promise#mapError`](#promisemaperrorf) in that the function *must* return a promise
itself.
Execute a function `f` with the reason of a rejected promise. This differs
from [`Promise#mapError`](#promisemaperrorf) in that the function *must*
return a promise itself.

Its type signature is:

Expand Down Expand Up @@ -530,6 +531,11 @@ Similar to [`Promise#map`](#promisemapf), apply a function `f` to a promise of
a list but, instead of receiving a single argument, pass each value of the
list to the function separately.

## Contributors

`mapError` and `chainError` were contributed by [Rodolphe
Belouin](https://github.com/rbelouin).

## Acknowledgements

[James
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "An algebraic, Promises/A+ compliant implementation of Promises.",
"keywords": ["promises", "monad", "functor", "promises-aplus"],
"authors": ["Paul Mucur"],
"version": "0.4.0",
"version": "0.5.0",
"main": "lib/pacta.js",
"devDependencies": {
"mocha": "1.12.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"homepage": "https://github.com/mudge/pacta",
"author": "Paul Mucur (http://mudge.name)",
"keywords": ["promises", "monad", "functor", "promises-aplus"],
"version": "0.4.0",
"version": "0.5.0",
"main": "./lib/pacta.js",
"dependencies": {},
"devDependencies": {
Expand Down

0 comments on commit 986ee79

Please sign in to comment.