fake-history
fake-history is a fake History
object.
Installation
$ npm install fake-history
Usage
;; ;history.pushState1, '1', '/1';history.pushState2, '2', '/2';history.pushState3, '3', '/3';history.back; asserthistory.length === 3;asserthistory.state === 2; // extendedasserthistory.current === '/2';asserthistory.currentState === 2;asserthistory.next === '/3';asserthistory.nextState === 3;asserthistory.previous === '/1';asserthistory.previousState === 1;
API
Related Project
- bouzuya/fake-history-fns ... fake-history functions