(find-templates m)
(find-templates m path saved)
finds the template with associated path
(find-templates {:hash "{{hash}}" :salt "{{salt}}" :email "{{email}}" :user {:firstname "{{firstname}}" :lastname "{{lastname}}"}}) => {"{{hash}}" [:hash] "{{salt}}" [:salt] "{{email}}" [:email] "{{firstname}}" [:user :firstname] "{{lastname}}" [:user :lastname]}
finds the template with associated path (find-templates {:hash "{{hash}}" :salt "{{salt}}" :email "{{email}}" :user {:firstname "{{firstname}}" :lastname "{{lastname}}"}}) => {"{{hash}}" [:hash] "{{salt}}" [:salt] "{{email}}" [:email] "{{firstname}}" [:user :firstname] "{{lastname}}" [:user :lastname]}
(template? s)
checks if an object is a template
(template? "{{template}}") => true
(template? :not-one) => false
checks if an object is a template (template? "{{template}}") => true (template? :not-one) => false
(transform schema [from to] data)
creates a transformation function (transform {:keystore {:hash "{{hash}}" :salt "{{salt}}" :email "{{email}}"}
:db {:login {:type :email
:user {:hash "{{hash}}"
:salt "{{salt}}"}
:value "{{email}}"}}}
[:keystore :db]
{:hash "1234"
:salt "ABCD"
:email "a@a.com"})
=> {:login {:type :email, :user {:hash "1234", :salt "ABCD"}, :value "a@a.com"}}
creates a transformation function (transform {:keystore {:hash "{{hash}}" :salt "{{salt}}" :email "{{email}}"} :db {:login {:type :email :user {:hash "{{hash}}" :salt "{{salt}}"} :value "{{email}}"}}} [:keystore :db] {:hash "1234" :salt "ABCD" :email "a@a.com"}) => {:login {:type :email, :user {:hash "1234", :salt "ABCD"}, :value "a@a.com"}}
(transform-fn schema [from to])
creates a transformation function ((transform-fn {:keystore {:hash "{{hash}}" :salt "{{salt}}" :email "{{email}}"}
:db {:login {:type :email
:user {:hash "{{hash}}"
:salt "{{salt}}"}
:value "{{email}}"}}}
[:keystore :db])
{:hash "1234" :salt "ABCD" :email "a@a.com"}) => {:login {:type :email, :user {:hash "1234", :salt "ABCD"}, :value "a@a.com"}}
creates a transformation function ((transform-fn {:keystore {:hash "{{hash}}" :salt "{{salt}}" :email "{{email}}"} :db {:login {:type :email :user {:hash "{{hash}}" :salt "{{salt}}"} :value "{{email}}"}}} [:keystore :db]) {:hash "1234" :salt "ABCD" :email "a@a.com"}) => {:login {:type :email, :user {:hash "1234", :salt "ABCD"}, :value "a@a.com"}}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close