Skip to content

Like ig/refset, but resolves to a map from keys to resolved refs

Notifications You must be signed in to change notification settings

tape-framework/refmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

tape.refmap

About

  • see this Integrant PR and associated issues.

  • aims to support both Clojure & ClojureScript

The refmap construct is similar to refset, but resolves to a map from keys to resolved refs, rather than a set of refs; it is useful when the keys are meaningful to the logic beyond just being a slot in the config map, and are required in further logic.

Usage

(ns my-ns
  (:require [tape.refmap :as rm]))

;; Use the refmap dependecy spec in config maps
{:foo/a (rm/refmap :foo/b), :foo/b 1}

;; When reading edn configs, use the `#tape/refmap` tag symbol
;; and extra `rm/readers` reader tags.
(ig/read-string {:readers rm/readers}
                "{:foo/a #tape/refmap :foo/b, :foo/b 1}")

License

Copyright © 2019 clyfe

Distributed under the MIT license.

About

Like ig/refset, but resolves to a map from keys to resolved refs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published