Skip to content

Commit

Permalink
Set version to 6.1.434
Browse files Browse the repository at this point in the history
  • Loading branch information
niwinz committed Feb 12, 2022
1 parent 37bb73e commit ef049f8
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 7 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog #

## Version 6.1.x
## Version 6.1.434

Date: 2022-02-12

- Add `as->` threading macro (thanks to @wilkerlucio)


## Version 6.1.431

Date: 2022-02-03

Expand Down
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
# promesa #

A promise/future library for Clojure & ClojureScript.
[![Clojars Project](http://clojars.org/funcool/promesa/latest-version.svg)](http://clojars.org/funcool/promesa)

See the [documentation](https://funcool.github.io/promesa/latest/) for
A lightweight promise/future library for Clojure & ClojureScript built
on top of native primitives (`js/Promise` on JS, and
`ClompletableFuture` on JVM).

This library exposes a bunch of usefull syntactic abstractions that
will considerably simplify to work with promises (in a very similar
way as you will do it in JS with async/await).

```clojure
(ns some.namespace
(:require [promesa.core :as p]))

(defn fetch-uuid-v1
[]
(p/let [response (js/fetch "https://httpbin.org/uuid")]
(.json response)))

(defn fetch-uuid-v2
[]
(p/-> (js/fetch "https://httpbin.org/uuid") .json))
```

See the complete [documentation](https://funcool.github.io/promesa/latest/) for
more detailed information.

11 changes: 7 additions & 4 deletions doc/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ A promise library for Clojure and ClojureScript.
Leiningen:

```clojure
[funcool/promesa "6.1.431"]
[funcool/promesa "6.1.434"]
```

deps.edn:

```clojure
funcool/promesa {:mvn/version "6.1.431"}
funcool/promesa {:mvn/version "6.1.434"}
```

On the JVM platform _promesa_ is built on top of *completable futures*
Expand Down Expand Up @@ -215,9 +215,9 @@ step, there are the `chain` and `chain'` functions:
multiple transformation functions.


### `->` and `->>`
### `->`, `->>` and `as->`

NOTE: introduced in 6.1.431
**NOTE**: `->` and `->>` introduced in 6.1.431, `as->` introduced in 6.1.434.

This threading macros simplifices chaining operation, removing the
need of using `then` all the time.
Expand All @@ -242,6 +242,9 @@ Then, the same code can be simplified with:
The threading macros hides all the accidental complexity of using
promise chaining.

The `->>` and `as->` are equivalent to the clojure.core macros, but
they work with promises in the same way as `->` example shows.


### `handle`

Expand Down

0 comments on commit ef049f8

Please sign in to comment.