# hishim

> History API shim for non-browser environments

Latest version **0.0.4** (published 2023-12-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install hishim
pnpm add hishim
yarn add hishim
bun add hishim
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2023-12-13 |
| First published | 2023-03-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Yukino Song |
| Maintainers | classicoldsong |
| Keywords | history, shim, jerryscript, quickjs, node |

## Links

- npm: https://www.npmjs.com/package/hishim
- Repository: https://github.com/ClassicOldSong/hishim
- Issues: https://github.com/ClassicOldSong/hishim/issues
- npm.io page: https://npm.io/package/hishim

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2023-12-13
- 0.0.3 — 2023-05-09
- 0.0.2 — 2023-03-14
- 0.0.1 — 2023-03-14

## README

Hishim
=====
[History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) Shim for non-browser env

---

# Installation
```shell
npm i hishim
```

# Usage
```js
import History from 'hishim'

const history = new History({
	handleBack(oldCurrent, newCurrent, next) {...},
	handleForward(oldCurrent, newCurrent, next) {...},
	handlePushState(oldCurrent, newCurrent, next) {...},
	handleReplaceState(oldCurrent, newCurrent, next) {...}
})
```

```ts
interface CurrentState {
	state: any, // your state
	idx: number, // index of the current state
	url: string, // url of this state
	title: string, // page title of this state
	prev: CurrentState, // previous state
	next: Current // next state
}
```

# License
MIT

---
_Source: https://npm.io/package/hishim · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
