-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
39 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters