enigma.js - interceptors

Another interesting feature of enigma.js are interceptors. Interceptors are similar to the mixins functions but they are executed on lower level - request/response level. Request interceptors are invoked right before the request is send to the Engine and response interceptors are invoked right after the response from the Engine is received and before the data is send to the calling function. You can think of the interceptors as “enigma.js middleware”. ...

July 8, 2020 · 4 min · 646 words

Custom enigma.js mixins

In the previous post we saw what are enigma.js mixins. I’ve started an repo some time ago (and npm package) where I’ve been adding mixins that I’ve found useful (or mixins that I’ve found boring to write all the time). And want to introduce you to this list. At the moment the repo contains only mixins that are relevant to application/document. (to distinct the mixins methods from the default enigma.js ones all mixin methods, from this package, are having prefix m) ...

July 3, 2020 · 3 min · 477 words