-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created empty platform.cljs file - see #19
- Loading branch information
lenz
committed
Nov 16, 2018
1 parent
beb4c19
commit 443b37f
Showing
3 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
(ns cli-matic.platform | ||
" | ||
## Platform-specific functions for Node. | ||
At the moment it's all empty. | ||
BTW, in this NS, we avoid using Spec / Orchestra. | ||
") | ||
|
||
(defn read-env | ||
"Reads an environment variable. | ||
If undefined, returns nil." | ||
[var] | ||
nil) | ||
|
||
(defn exit-script | ||
"Terminates execution with a return value." | ||
[retval] | ||
nil) | ||
|
||
(defn add-shutdown-hook | ||
"Add a shutdown hook. | ||
Does not work (?) on CLJS. | ||
" | ||
[fnToCallOnShutdown] | ||
|
||
nil) | ||
|
||
; | ||
; Conversions | ||
; | ||
|
||
(defn parseInt | ||
"Converts a string to an integer. " | ||
[s] | ||
nil) | ||
|
||
(defn parseFloat | ||
"Converts a string to a float." | ||
[s] | ||
nil) | ||
|
||
(defn asDate | ||
"Converts a string in format yyyy-mm-dd to a | ||
Date object; if conversion | ||
fails, returns nil." | ||
[s] | ||
nil) | ||
|