{"id":21804859,"url":"https://github.com/pez/taplet","last_synced_at":"2025-04-13T19:33:05.722Z","repository":{"id":62434263,"uuid":"348441663","full_name":"PEZ/taplet","owner":"PEZ","description":"Clojure/ClojureScript utilities for tapping things. let\u003e macro, and #t reader tag","archived":false,"fork":false,"pushed_at":"2023-10-06T21:03:38.000Z","size":68,"stargazers_count":32,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-27T10:12:05.867Z","etag":null,"topics":["clojure","clojurescript","macro","repl"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PEZ.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["PEZ"]}},"created_at":"2021-03-16T17:50:10.000Z","updated_at":"2024-05-31T07:57:48.000Z","dependencies_parsed_at":"2022-11-01T21:01:51.097Z","dependency_job_id":null,"html_url":"https://github.com/PEZ/taplet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Ftaplet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Ftaplet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Ftaplet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Ftaplet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PEZ","download_url":"https://codeload.github.com/PEZ/taplet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248768164,"owners_count":21158589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","clojurescript","macro","repl"],"created_at":"2024-11-27T11:57:10.154Z","updated_at":"2025-04-13T19:33:05.693Z","avatar_url":"https://github.com/PEZ.png","language":"Clojure","readme":"# taplet\n\nUtilities for tapping Clojure forms.\n\n1. A Clojure/ClojureScript macro, named `let\u003e` that works like `let`, and also will `tap\u003e` the let box (that's what I call that bininding vector).\n2. A reader tag, `#t` that will tap the tagged form.\n\n## Usage\n\nDependency\n\n\n``` clojure\n;; deps.edn\n{pez/taplet {:mvn/version \"1.0.62\"}}\n\n;; Leiningen\n[pez/taplet \"1.0.62\"]\n```\n\n## let\u003e\n\nUse `let\u003e` wherever you have a `let` that you want to tap. Optionally label the taps using `{:let\u003e :some-label}` as metadata for the binding vector.\n\n```clojure\n(comment\n  (require '[pez.taplet :refer [let\u003e]])\n\n  (add-tap (partial println \"tap\u003e\")) ;; Only for observability here\n\n  (let\u003e [x 1\n         y 2\n         coords {:x x :y y}]\n    coords) ;; =\u003e {:x 1, :y 2}\n           ;; tap\u003e [x 1 y 2 coords {:x 1, :y 2}]\n\n  (let\u003e ^{:let\u003e :labeled-taps} [x 1\n                                y 2\n                                coords {:x x :y y}]\n    coords) ;; =\u003e {:x 1, :y 2}\n           ;; tap\u003e [:labeled-taps x 1 y 2 coords {:x 1, :y 2}]\n\n  (let\u003e [x 1\n         {:keys [z] :as y} {:z 2}\n         [a [b {:keys [c d]}]] [:foo [:bar {:c :baz :d :gaz}]]]\n    [x z y a b c d]) ;; =\u003e [1 2 {:z 2} :foo :bar :baz :gaz]\n                    ;; tap\u003e [x 1 y {:z 2} z 2 a :foo b :bar c :baz d :gaz]\n\n  :rcf)\n```\n\n## #t\n\nTo tap any value, prepend it with `#t`. You'll need to “install” the reader tag once per\nREPL session. If you plan to leave `#t` in the code (or plan to sometimes forget to\nremove it), you could consider adding it to a file that is always loaded early in app\nthe app start. (E.g. The topmost level namespace.)\n\n``` clojure\n(comment\n  (require '[pez.hasht]) ;; Only needed to be done once per REPL session\n\n  (add-tap (partial println \"tap\u003e\")) ;; Only for observability here\n\n  #t (let [x 1\n           y 2\n           coords {:x x :y y}]\n       (:x #t coords)) ;; =\u003e 1\n                       ;; tap\u003e {:x 1, :y 2}\n                       ;; tap\u003e 1\n  :rcf)\n```\n\n## License\n\nMIT License, see LICENSE file\n\n","funding_links":["https://github.com/sponsors/PEZ"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpez%2Ftaplet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpez%2Ftaplet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpez%2Ftaplet/lists"}