athos / kitchen-async Goto Github PK
View Code? Open in Web Editor NEWA Promise library for ClojureScript, or a poor man's core.async
License: Eclipse Public License 1.0
A Promise library for ClojureScript, or a poor man's core.async
License: Eclipse Public License 1.0
First off, thank you for this library - I am finding it to be very useful!
I think I've found a bug with using plain keywords in the ->
threading macro.
Using a plain keyword, the result is passed through unchanged:
(p/-> (new js/Promise (fn [resolve reject]
(resolve {:x 10})))
:x
(print))
=> {:x 10}
^ incorrect
But if we use (get _ :kw)
, the correct result is returned:
(p/-> (new js/Promise (fn [resolve reject]
(resolve {:x 10})))
(get :x)
(print))
=> 10
^ correct
Have you considered publishing this to the npm registry so consumers using lumo could pull it down using npm or yarn?
Here is an example I found for core.async: https://github.com/mfikes/andare#lumo.
Getting excited to use this library, but was hoping to find some docs on the interop syntax for js/Promise -> core.async. I noticed the library is proposing to do this. Any thoughts of when?
Could you consider releasing 0.1.0 so we don't have to depend on a SNAPSHOT dependency.
The following form should be completely valid:
(p/-> (js/fetch url) .json)
But, the expansion result of that is not:
=> (macroexpand '(p/-> (js/fetch url) .json))
(try
(kitchen-async.promise/->
(kitchen-async.promise/then (js/fetch url) .json)) ;; <- .json should be (fn [x#] (.json x#)) here
(catch
:default
e__51305__auto__
(kitchen-async.promise/reject e__51305__auto__)))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.