A JavaScript library for managing browser session history anywhere JavaScript runs. vhistory 1.0.1 is a repackaged version of the popular `history` library by ReactTraining, abstracting environment differences and providing a minimal API to manage the history stack, navigate, confirm navigation, and persist state between sessions. It supports ES6 import and CommonJS require, with a UMD build available on unpkg. Key differentiators: simple API with `createHistory`, `push`, `replace`, `listen`, `goBack`, and `goForward` methods; compatible with browser and server-side environments.
npm install vhistoryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: create a history object, listen for location changes, push a new entry, and stop listening.
Install using `npm install --save vhistory` and import from `'vhistory'`.
Access via `window.History.createHistory()` or destructure: `const { createHistory } = window.History`.If upgrading to modern versions, use `history` package v4+ and methods like `createBrowserHistory`.
Change `import createHistory from 'vhistory'` to `import { createHistory } from 'vhistory'`.Ensure `const history = createHistory();` returns an object, and if using UMD, use `window.History.createHistory()`.
Run `npm install --save vhistory` and ensure import path is `'vhistory'` (not `'history'`).
No dependency data recorded yet.