anima-history

2.0.0 • Public • Published

anima-history


An awesome npm package!


Install

$ npm install anima-history --save

Usage

var AnimaHistory = require('Anima-history');
var animaHistory = new AnimaHistory({
  onback: function(hash, current, length, count) {
    console.log('onback:' + hash + '\ncurrent:' + current + '\nlength:' + length + '\ncount:' + count);
    console.log(this.getHistory(), current);
  },
  onforward: function(hash, current, length, count) {
    console.log('onforward:' + hash + '\ncurrent:' + current + '\nlength:' + length + '\ncount:' + count);
    console.log(this.getHistory(), current);
  },
  onreload: function(hash, current, length) {
    console.log('onreload:' + hash + '\ncurrent:' + current + '\nlength:' + length + '\n ');
    console.log(this.getHistory(), current);
  },
  onpush: function(hash, current, length) {
    console.log('onpush:' + hash + '\ncurrent:' + current + '\nlength:' + length + '\n ');
    console.log(this.getHistory(), current);
  },
  ssKey: 'sessionStorage的唯一key'
})

Readme

Keywords

none

Package Sidebar

Install

npm i anima-history

Weekly Downloads

0

Version

2.0.0

License

none

Last publish

Collaborators

  • jaredleechn
  • smbey0nd
  • yuanfei.gyf