1.6.4 • Published 6 years ago
self-tracing-hyperapp v1.6.4
Self-Tracing Hyperapp
Call self-tracing-hyperapp with an additional truthy argument to enable real-time self-logging:
let main = app(state, actions, view, container, true);
This version of Hyperapp is non-breaking, you can swap it out in any existing V1 hyperapp project with no additional changes necessary.
npm install self-tracing-hyperapp
Additional Functionality
Additional Properties :
- .log- Accumulates all acitons calls, parial states, and v-dom rerenders through the lifecycle of your application. Action calls and their direct downstream effects are logged under the same entry ID.
- .log.actions - Stores a mirror of the application's actions with functions replaced by true/false to indicate if it is being tracked.
Additional Methods:
args | behavior | |
---|---|---|
.logActions | nothing, a string, or array of strings | prints all actions, a top-level action, or a nested action |
.logState | nothing, a string, or array of string | prints full state, a top-level state property, or a nested state |
.logVdom | nothing, or a string | prints the whole v-dom, or the element with id matching your argument |
.logIgnore | a string, or array of strings | will exclude the designated top-level, or nested action from the log. the partial state and vdom from this action will also be ignored |
.logTrack | a string, or array of strings | will include the designated top-level or nested action in the log. the partial state and vdom from this action will be logged |
.logFlag | strings are best, but anything works | pushes your arg into the log |
.logConfig | { actions: boolean, state: boolean, vdom: boolean } | globally tracks or ignores all actions, state changes, or vdom changes |