nanohistory
Small browser history library
Last updated 4 years ago by yoshuawuyts .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install nanohistory 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (4 years ago)

1 Versions

  • 1.0.0                                ...           4 years ago

Copyright 2014 - 2016 © taobao.org |