Liking cljdoc? Tell your friends :D

rainboots.hooks

Global hooks system

Global hooks system
raw docstring

*hooks*clj

source

clean-fn-nameclj

(clean-fn-name fn-var)
source

do-hook!clj

(do-hook! hook-name fn-name options fun)
source

do-unhook!clj

(do-unhook! hook-name fn-name fun)
source

hook!cljmacro

(hook! hook-name fun)
(hook! hook-name options fun)

Install a hook. Hooks are fired with undefined ordering, with each subsequent hook receiving the results of the one before it. The argument(s) passed to a hook are arbitrary, but each hook MUST return the same 'type' of data it received, so as to play nicely with other installed hooks of the same kind.

The name of a hook is similarly arbitrary---it may be a String or a Keyword or whatever you want, as long as you use it consistently.

Install a hook. Hooks are fired with undefined ordering, with each
 subsequent hook receiving the results of the one before it. The
 argument(s) passed to a hook are arbitrary, but each hook MUST
 return the same 'type' of data it received, so as to play nicely
 with other installed hooks of the same kind.

The name of a hook is similarly arbitrary---it may be a String or a
 Keyword or whatever you want, as long as you use it consistently.
sourceraw docstring

insert-hook!cljmacro

(insert-hook! hook-name fun)

DEPRECATED: use (hook!) with a priority.

Insert a fn as the first to be called for the given hook, before any already-registered hooks. See hook!

DEPRECATED: use `(hook!)` with a priority.

Insert a fn as the first to be called for the given hook, before any
already-registered hooks. See hook!
sourceraw docstring

installed-hook-pairsclj

(installed-hook-pairs hook-name)

Get the list of [name, installed hook fn] names for the given hook

Get the list of [name, installed hook fn] names for the given hook
sourceraw docstring

installed-hooksclj

(installed-hooks hook-name)

Get the list of installed hook funs for the given hook

Get the list of installed hook funs for the given hook
sourceraw docstring

trigger!clj

(trigger! hook-name arg)

Trigger a hook kind. hook-name should be a previously installed hook via (hook!), but it is not an error to fire a hook with nothing installed to it. Returns the final result returned from the last-run hook fn, or the input arg itself if no hooks are installed.

Trigger a hook kind. hook-name should be a previously installed hook
via (hook!), but it is not an error to fire a hook with nothing
installed to it.  Returns the final result returned from the
last-run hook fn, or the input arg itself if no hooks are
installed.
sourceraw docstring

unhook!cljmacro

(unhook! hook-name fun)

Uninstall a previously installed hook fn

Uninstall a previously installed hook fn
sourceraw docstring

with-hooks-contextcljmacro

(with-hooks-context & body)
source

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

× close