If running on ClojureScript, we can have a different file for JS.
BTW, in this NS, we avoid using Spec / Orchestra.
## Platform-specific functions for the JVM. If running on ClojureScript, we can have a different file for JS. BTW, in this NS, we avoid using Spec / Orchestra.
At the moment it's all empty.
BTW, in this NS, we avoid using Spec / Orchestra.
## Platform-specific functions for Node. At the moment it's all empty. BTW, in this NS, we avoid using Spec / Orchestra.
(add-shutdown-hook fnToCallOnShutdown)
Add a shutdown hook. If nil
, simply ignores it.
The shutdown hook is run in a new thread.
Add a shutdown hook. If `nil`, simply ignores it. The shutdown hook is run in a new thread.
Add a shutdown hook.
Does not work (?) on CLJS.
Add a shutdown hook. Does not work (?) on CLJS.
(asDate s)
Converts a string in format yyyy-mm-dd to a Date object; if conversion fails, returns nil.
Converts a string in format yyyy-mm-dd to a Date object; if conversion fails, returns nil.
(exit-script retval)
Terminates execution with a return value.
Terminates execution with a return value.
(parseEdn edn-in)
Decodes EDN through clojure.edn.
Decodes EDN through clojure.edn.
See https://stackoverflow.com/questions/44661385/how-do-i-read-an-edn-file-from-clojurescript-running-on-nodejs
(parseFloat s)
Converts a string to a float.
Converts a string to a float.
(parseInt s)
Converts a string to an integer.
Converts a string to an integer.
(read-env var)
Reads an environment variable. If undefined, returns nil.
Reads an environment variable. If undefined, returns nil.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close