nanohistory

1.0.0 • Public • Published

nanohistory stability

npm version build status downloads js-standard-style

Small browser history library. Although you might as well just use the native DOM API (read the source and decide for yourself).

Usage

var nanohistory = require('nanohistory')
nanohistory(function (location) {
  console.log('new location is', location)
})
 
// Trigger the history API a couple of times
window.history.pushState({}, null, '/foo')
window.history.pushState({}, null, '/bar')

API

nanohistory(callback(location))

Register a new history API listener. This will fire whenever the history API is triggered.

License

MIT

Package Sidebar

Install

npm i nanohistory

Weekly Downloads

19

Version

1.0.0

License

MIT

Last publish

Collaborators

  • mreinstein
  • benlyn
  • s3ththompson
  • yoshuawuyts
  • bret
  • lrlna
  • yerkopalma
  • juliangruber
  • timwis
  • ahdinosaur
  • toddself
  • sethvincent
  • maxogden
  • shama
  • freeman-lab
  • feross
  • emilbayes
  • colingourlay
  • jameskyburz
  • almost
  • slaskis
  • ungoldman
  • graforlock
  • tornqvist
  • amongiants
  • goto-bus-stop
  • mafintosh