Liking cljdoc? Tell your friends :D

hara.data.coerce


*coerce-chart*clj


assoc-setclj

(assoc-set m s v)
(assoc-set m s v & more)

associates a set as keys to a map (assoc-set {} #{:a :b :c} 1) => {:a 1, :b 1, :c 1}

associates a set as keys to a map
(assoc-set {} #{:a :b :c} 1)
=> {:a 1, :b 1, :c 1}
raw docstring

coerceclj

(coerce v t)
(coerce v t chart)

associates a set as keys to a map (coerce 1 :string) => "1"

(coerce "2017-05-25T17:29:46.000Z" :instant) => (java.util.Date. 117 4 25 17 29 46)

(coerce "2017-05-25T17:29:46Z" :instant) => (java.util.Date. 117 4 25 17 29 46)

(coerce "oeuoe" :keyword) => :oeuoe

associates a set as keys to a map
(coerce 1 :string)
=> "1"

(coerce  "2017-05-25T17:29:46.000Z" :instant)
=> (java.util.Date. 117 4 25 17 29 46)

(coerce "2017-05-25T17:29:46Z" :instant)
=> (java.util.Date. 117 4 25 17 29 46)

(coerce "oeuoe" :keyword)
=> :oeuoe
raw docstring

date-format-jsclj


date-format-jsonclj


default-coerce-chartclj


default-coerce-to-string-chartclj


from-string-chartclj


hash-mapsetclj

(hash-mapset s v)
(hash-mapset s v & more)

constructs a hashmap from a set of keys

(hash-mapset #{:a :b :c} 1 #{:d :e} 2) => {:c 1, :b 1, :a 1, :e 2, :d 2}

constructs a hashmap from a set of keys

(hash-mapset #{:a :b :c} 1 #{:d :e} 2)
=> {:c 1, :b 1, :a 1, :e 2, :d 2}
raw docstring

Numbersclj


parse-dateclj

(parse-date s)

converts string to date

(parse-date "2017-05-25T17:29:46.000Z") ;;#inst "2017-05-25T09:29:46.000-00:00" => java.util.Date

converts string to date

(parse-date "2017-05-25T17:29:46.000Z")
;;#inst "2017-05-25T09:29:46.000-00:00"
=> java.util.Date
raw docstring

read-enumclj

(read-enum s)

helper function for enums

(read-enum ":enum") => :enum

(read-enum "12334") => 12334

(read-enum "{}") => throws

helper function for enums

(read-enum ":enum") => :enum

(read-enum "12334") => 12334

(read-enum "{}") => throws
raw docstring

read-refclj

(read-ref s)

helper function for refs

(read-ref "{:a 1}") => {:a 1}

(read-ref "_") => throws

helper function for refs

(read-ref "{:a 1}") => {:a 1}

(read-ref "_") => throws
raw docstring

Stringsclj

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

× close