Skip to content

@xtandard/links/hooks/log

A reference hook: createLogHook() logs mutation events. A starting point for your own after side effects. Zero dependencies.

import { … } from "@xtandard/links/hooks/log";
Name Summary
createLogHook Build a hook that logs each mutation event as [@xtandard/links] <phase> <type> <json>. Never throws from before, so it never denies a mutation — it is a pure observer.
Name Summary
LogHookOptions Options for createLogHook: log (default console.log), includeBefore, json (one JSON object per line), describe (an extra text-format field) and format (replaces the whole line).