Skip to content

alexandergunnarson/promesa

This branch is 2 commits ahead of funcool/promesa:master.

Folders and files

NameName
Last commit message
Last commit date
Sep 28, 2022
Feb 19, 2023
May 21, 2023
Dec 4, 2023
Sep 28, 2022
Nov 22, 2022
Nov 18, 2024
Dec 4, 2023
Dec 5, 2023
Dec 5, 2023
Dec 5, 2023
Jan 16, 2024
Oct 15, 2022
Aug 22, 2023
May 20, 2023
May 20, 2023
Nov 13, 2022
Dec 5, 2023
May 21, 2023
May 21, 2023
Feb 22, 2022
Dec 5, 2023

Repository files navigation

promesa

Clojars Project

A promise library & concurrency toolkit for Clojure and ClojureScript.

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) and many helpers from executors to concurrency patterns (bulkhead & CSP). With 0 runtime external dependencies.

Here you can look a detailed documentation.

Getting Started

deps.edn:

funcool/promesa {:mvn/version "11.0.678"}

Leiningen:

[funcool/promesa "11.0.678"]

On the REPL

(require '[promesa.core :as p])

(->> (p/promise 1)
     (p/map inc)
     (deref)
;; => 2

NOTE: example only work on JVM because the evident lack of blocking primitives on JS runtime.

Contributing

If you miss something, feel free to open an issue for a discussion. If there is a clear use case for the proposed enhacement, the PR will be more than welcome.

Testing

Run the Clojure (.clj) tests:

clojure -X:dev:test

Run the ClojureScript (.cljs) tests:

npm install
npm test

About

A promise library for Clojure(Script)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 99.6%
  • Shell 0.4%