Liking cljdoc? Tell your friends :D

run.avelino.logseq-libs.macros

Macros for generating Logseq API wrapper functions

Macros for generating Logseq API wrapper functions
raw docstring

db-methodsclj/s

Methods for the :DB namespace

Methods for the :DB namespace
sourceraw docstring

deflogseq-apiclj/smacro

(deflogseq-api ns-kw)

Define wrapper functions for Logseq API methods. Takes a namespace keyword (e.g. :Editor) and a vector of method names. Generates wrapper functions for all provided methods in the namespace.

For each method, generates a ClojureScript wrapper function that:

  • Has a kebab-case name with ! suffix (e.g. removeBlock -> remove-block!)
  • Automatically converts between JS and CLJS data structures
  • Handles promises appropriately by converting results to CLJS data
  • Includes detailed documentation

Example: (deflogseq-api :Editor ["removeBlock" "insertBlock"])

Generates functions remove-block! and insert-block! that wrap the corresponding methods from logseq.Editor namespace.

Define wrapper functions for Logseq API methods.
Takes a namespace keyword (e.g. :Editor) and a vector of method names.
Generates wrapper functions for all provided methods in the namespace.

For each method, generates a ClojureScript wrapper function that:
- Has a kebab-case name with ! suffix (e.g. removeBlock -> remove-block!)
- Automatically converts between JS and CLJS data structures
- Handles promises appropriately by converting results to CLJS data
- Includes detailed documentation

Example:
(deflogseq-api :Editor ["removeBlock" "insertBlock"])

Generates functions remove-block! and insert-block! that wrap
the corresponding methods from logseq.Editor namespace.
sourceraw docstring

discover-methodsclj/s

(discover-methods ns-kw)

Discover all methods in a Logseq namespace at compile time. Returns a vector of method names as strings.

Example: (discover-methods :Editor) => ["removeBlock" "insertBlock" ...]

Discover all methods in a Logseq namespace at compile time.
Returns a vector of method names as strings.

Example:
(discover-methods :Editor)
=> ["removeBlock" "insertBlock" ...]
sourceraw docstring

editor-methodsclj/s

Methods for the :Editor namespace

Methods for the :Editor namespace
sourceraw docstring

git-methodsclj/s

Methods for the :Git namespace

Methods for the :Git namespace
sourceraw docstring

ui-methodsclj/s

Methods for the :UI namespace

Methods for the :UI namespace
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close