https://github.com/rads/tap
🚰 Save tap> calls for debugging in the REPL
https://github.com/rads/tap
Last synced: 9 months ago
JSON representation
🚰 Save tap> calls for debugging in the REPL
- Host: GitHub
- URL: https://github.com/rads/tap
- Owner: rads
- License: mit
- Created: 2022-07-09T19:01:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-05T05:24:11.000Z (over 3 years ago)
- Last Synced: 2025-02-07T17:11:18.070Z (11 months ago)
- Language: Clojure
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rads.tap
Save `tap>` calls for debugging in the REPL.
## Usage
```clojure
; 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`:
```clojure
{:deps {io.github.rads/tap {:mvn/version "0.2.0"}}}
```
### Leiningen
Add `io.github.rads/tap` to `~/.lein/profiles.clj`:
```clojure
{:dependencies [[io.github.rads/tap "0.2.0"]]}
```