Socket
Socket
Sign inDemoInstall

rrrouter-history

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rrrouter-history

simplest history session manager


Version published
Weekly downloads
6
increased by50%
Maintainers
1
Install size
10.3 kB
Created
Weekly downloads
 

Readme

Source

#Purpose Session manager for history.

#Installation

npm install --save rrrouter-history

#Implementations

TypeDescription
HashHistoryImplements history session management based of hash part of url. Supported by old browsers.
BrowserHistoryImplements history session management based of HTML5 History Api. Supported by modern browsers.

#How to create own? Just create class that has following methods:

MethodDescription
subscribe(callback)Add a listener for changes, where callback is callback that will be called in case of inside changes. E.g.: go(-1)
unsubscribeRemove a listener
update(href,navigate)Update a history, where href is a new href and navigate is a flag about type of update: TRUE - navigate to a new location, FALSE - replace current location
go(page)Move forward/backward in browser history, where page is number of pages to move.

Keywords

FAQs

Last updated on 27 Jan 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc