Liking cljdoc? Tell your friends :D

stillsuit.lib.util

A collection of utility functions.

A collection of utility functions.
raw docstring

deep-map-mergeclj

(deep-map-merge & maps)

Recursively merge one or more maps, using the values of later maps to replace the values of earlier ones.

Recursively merge one or more maps, using the values of later maps to replace the
values of earlier ones.
sourceraw docstring

deep-merge-withclj

(deep-merge-with f & maps)

Like merge-with, but merges maps recursively, appling the given fn only when there's a non-map at a particular level.

  (deep-merge-with + {:a {:b {:c 1 :d {:x 1 :y 2}} :e 3} :f 4}
                     {:a {:b {:c 2 :d {:z 9} :z 3} :e 100}})
  ; => {:a {:b {:z 3, :c 3, :d {:z 9, :x 1, :y 2}}, :e 103}, :f 4}
Like merge-with, but merges maps recursively, appling the given fn
only when there's a non-map at a particular level.
```clojure
  (deep-merge-with + {:a {:b {:c 1 :d {:x 1 :y 2}} :e 3} :f 4}
                     {:a {:b {:c 2 :d {:z 9} :z 3} :e 100}})
  ; => {:a {:b {:z 3, :c 3, :d {:z 9, :x 1, :y 2}}, :e 103}, :f 4}
```
sourceraw docstring

load-edn-fileclj

(load-edn-file filename)

Given a filename in resources, read and parse it, returning nil if it wasn't found

Given a filename in resources, read and parse it, returning nil if it wasn't found
sourceraw docstring

load-edn-resourceclj

(load-edn-resource resource-path)

Given a filename in resources, read and parse it, returning nil if it wasn't found

Given a filename in resources, read and parse it, returning nil if it wasn't found
sourceraw docstring

simplifyclj

(simplify m)

Converts all ordered maps nested within the map into standard hash maps, and sequences into vectors, which makes for easier constants in the tests, and eliminates ordering problems.

Converts all ordered maps nested within the map into standard hash maps, and
sequences into vectors, which makes for easier constants in the tests, and
eliminates ordering problems.
sourceraw docstring

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

× close