Package Exports
- diffhtml-middleware-verify-state
- diffhtml-middleware-verify-state/dist/cjs/index.js
- diffhtml-middleware-verify-state/dist/es/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (diffhtml-middleware-verify-state) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
<±/> diffHTML Verify State Middleware
Stable Version: 1.0.0-beta.30
Asserts that a render properly updated the old Virtual Tree and the DOM. Will recursively search for inconsistencies, displays warnings unless debugging is enabled, then it throws errors instead.
Installation
npm install diffhtml-middleware-verify-state
Example
import { use } from 'diffhtml';
import verifyState from 'diffhtml-middleware-verify-state';
// Throw when debug is truthy (when location.search has `?debug`)
use(verifyState({ debug: location.search.includes('debug') }));
This is not a very performant middleware, so please do not use this in production where performance is critical. Use in development.