Macros that make using interceptors easier without sacrificing callability.
It provides a few public functions.
Speed and ease for the user. It's a low-cost high-leverage change. It allows you to write interceptor fns as well construct chains and calls to chains without having to think about the system as a whole. Here are the benefits;
ixfn-your-symbol
while plain fns are simply your-symbol
. You use your-symbol
like any other fn.exec
fn an extra argument can be provided to control the return value. This extra argument is also simply a keyword to extract or a collection of keywords to use with select keys. This adds to the runtime dynamism of using INXS.This ease and speed doesn't come free. Here are the negatives;
ixfn
is a macro.all-ns
which makes crossplatform usage difficult since virtually all calls require an extra argument (all the namespaces to search for ixfns). Because it just became awkward writing/reading/using it this way, I eventually dropped CLJS support. This was a painful decision for me, but I'd rather enjoy developing on one platform than not enjoy two. I'm debating just using the macro in CLJS and not making the chain fn available, but for now in my personal use, I just don't have a reason to use interceptors in the browser.Yes.
Use it, dream of a better future, and complain. This library does little and won't ever do much so...
Exoscale Interceptor - It's the simplest interceptor library out there. It does little, asks for little, and reliably does what it says.
Lambda Island Episode #32 - This was the first time it hit me that I could store the var itself in the metadata attached to a var. I've learned painfully not to overuse it, but it's still a powerfully simple way to do cool stuff.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close