linkedom-history
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

codecov npm version

This is a package that adds history to linkedom.

Installation and Example

Install peer dependencies:

pnpm add history linkedom

Then install this module

pnpm install linkedom-history

Or, 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.

Package Sidebar

Install

npm i linkedom-history

Weekly Downloads

0

Version

1.1.3

License

MIT

Unpacked Size

6.37 kB

Total Files

5

Last publish

Collaborators

  • thejohnhoffer