Util functions abstracted out for Cumulo projects.
[cumulo/util "0.1.5"]
Notice that you will need shortid
in your project since it's depended on:
yarn add shortid
(cumulo-util.core/find-first "x" ["x" "y"])
(cumulo-util.core/get-env! x) ; reading process.env[x]
(cumulo-util.core/id!)
(cumulo-util.core/unix-time!)
(cumulo-util.core/repeat! 1 #(println "doing")!) ; in seconds
(cumulo-util.core/delay! 1 #(println "done")!) ; in seconds
(cumulo-util.core/on-page-touch (fn [] (println "touched")))
(cumulo-util.file/write-mildly! "a.text" "content")
(cumulo-util.file/get-backup-path!)
(cumulo-util.file/merge-local-edn! {} "a.edn" (fn [found?] (println found?)))
; macros
(cumulo-util.build/get-ip!)
(cumulo-util.build/inline-resource "a.text")
MIT
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close