Skip to content

fancygits/malapropism

 
 

Repository files navigation

malapropism

https://github.com/dpassen/malapropism/actions/workflows/test.yaml/badge.svg https://github.com/dpassen/malapropism/actions/workflows/lint.yaml/badge.svg https://github.com/dpassen/malapropism/actions/workflows/check.yaml/badge.svg https://img.shields.io/clojars/dt/org.passen/malapropism.svg?color=opal

An omniconf inspired config library using malli

Latest version

malapropism is deployed to Clojars

https://img.shields.io/clojars/v/org.passen/malapropism.svg

Usage

(require '[org.passen.malapropism.core :as malapropism])

(def config-schema
  [:map
   [:env-key
    {:optional true
     :title    "environment key"}
    :keyword]
   [:scm-rev
    {:optional true
     :title    "scm revision"}
    :string]])

(-> (malapropism/with-schema config-schema)
    (malapropism/with-values-from-env)
    (malapropism/with-values-from-map
      {:env-key :dev
       :scm-rev "923345"})
    (malapropism/verify! ::verbose))

License

Copyright © 2022 Derek Passen

Released under an MIT license.

About

Malli-backed configuration library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 98.5%
  • Emacs Lisp 1.5%