Liking cljdoc? Tell your friends :D

Cumulo Util (WIP)

Util functions abstracted out for Cumulo projects.

Usage

Clojars Project

[cumulo/util "0.1.6"]

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?)))
(cumulo-util.file/sh! "ls") ; run shell command

; macros
(cumulo-util.build/get-ip!)
(cumulo-util.build/inline-resource "a.text")

License

MIT

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close