Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 777 Bytes

README.md

File metadata and controls

40 lines (26 loc) · 777 Bytes

rads.tap

Save tap> calls for debugging in the REPL.

Usage

; Load the library (includes a call to clojure.core/add-tap)
(require 'rads.tap)

; Send some messages
(doseq [x (range 1000)] (tap> x))

; By default, we only save the last 100 values in-memory
(count @rads.tap/log) ; => 100

; Values are ordered by insertion time in ascending order
(take-last 5 @rads.tap/log) ; => (995 996 997 998 999)

; Use the rads.tap/limit to change the size of the buffer
(rads.tap/limit 1000)

Installation

tools.deps

Add io.github.rads/tap to deps.edn:

{:deps {io.github.rads/tap {:mvn/version "0.2.0"}}}

Leiningen

Add io.github.rads/tap to ~/.lein/profiles.clj:

{:dependencies [[io.github.rads/tap "0.2.0"]]}