[!!!] The source code of this package is on https://github.com/docomodigital/js-utils, this repository will be removed asap
Provides you an alternative method to manage previous and current page changements.
Is particularly used to get query params as object and to get the previous page in order to implement an easy and basic history in your routing.
import { Browser } from 'js-browser';
// Get previous page
const prevPage = Browser.getPrevPage();
// Set browser new state
Browser.shiftPage('/home');
// Get query params in your url
const queryParams = Browser.getQueryParams();
npm install --save @docomodigital/js-browser
To read documentation, go to:
http://docomodigital.github.io/js-browser/latest
or run the following command insite the js-browser folder:
npm run doc:open