1.1.3 • Published 4 years ago
linkedom-history v1.1.3
Linkedom History
This is a package that adds history to linkedom.
Installation and Example
Install peer dependencies:
pnpm add history linkedomThen install this module
pnpm install linkedom-historyOr, run npm install or yarn add, based on your package manager. Use with a version of likedom and history as follows:
import { parseHTML } from "linkedom-history";
const doc = parseHTML("<body></body>").document;
const { history, location } = doc.defaultView;The parseHTML function acts in place of the function of the same name from linkedom. The linkedom-history also provides renderElement and resetDocument for testing React libraries.
Contributing
The published copy lives at linkedom-history on GitHub. Make any pull request against the main branch.
Package manager
I build and test with pnpm. I've tried npm, yarn@1, yarn@berry, but The uvu testing library currently recommendeds pnpm.