An open API service indexing awesome lists of open source software.

https://github.com/qzruncode/simple-history

simple history for browser
https://github.com/qzruncode/simple-history

Last synced: 9 months ago
JSON representation

simple history for browser

Awesome Lists containing this project

README

          

[![NPM version](https://img.shields.io/npm/v/simple-history.svg)](https://www.npmjs.com/package/simple-history)
[![NPM package](https://img.shields.io/npm/dy/simple-history.svg)](https://www.npmjs.com/package/simple-history)

## simple-history

```
import SimpleHistory from 'simple-history'

const id = SimpleHistory.listen((action, preUrl, location) => {
console.log(action, preUrl, location)
})

SimpleHistory.unlisten(id)

SimpleHistory.push(url, state)

SimpleHistory.replace(url, state)

SimpleHistory.go(n)

SimpleHistory.back()

SimpleHistory.forward()
```