(normalize {:keys [intensity-raw duration-raw frequency-raw disabled-present?]})Normalise raw attribute inputs into a stable view-model map.
Input keys: :intensity-raw string | nil :duration-raw string | nil :frequency-raw string | nil :disabled-present? boolean
Output keys: :intensity number :duration int :frequency number :disabled? boolean
Normalise raw attribute inputs into a stable view-model map. Input keys: :intensity-raw string | nil :duration-raw string | nil :frequency-raw string | nil :disabled-present? boolean Output keys: :intensity number :duration int :frequency number :disabled? boolean
(parse-duration s)Parse duration attribute to a positive int in [100, 5000], default 800.
Parse duration attribute to a positive int in [100, 5000], default 800.
(parse-frequency s)Parse frequency attribute to a float in [0.005, 0.2], default 0.04.
Parse frequency attribute to a float in [0.005, 0.2], default 0.04.
(parse-intensity s)Parse intensity attribute to a number in [1, 100], default 25.
Parse intensity attribute to a number in [1, 100], default 25.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |