Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

djinn-state-history

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

djinn-state-history

Djinn-state history integration

  • 1.3.0
  • next
  • latest
  • stable
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Djinn-state history

Build Status Codacy Badge Codacy Badge

Djinn-state helpers for history integration

This library is just a wrapper of the history package. The HistoryService have implemented all the exported functions and its parameters of the history package (push, go, goBack, goForward, replace, block, createHref) and with two more functions (pushLocation, replaceLocation) to receive the location object instead of its original ones.

Install

npm npm i --save djinn-state djinn-state-history

yarn yarn add djinn-state djinn-state-history

Using

// djinn.js
import { Djinn } from 'djinn-state';

export const djinn = new Djinn();

// djinnServices.js
import { HistoryService } from 'djinn-state-history';
import { djinn } from './djinn';

djinn.register(HistoryService);
djinn.start();

// index.js
import { HistoryService } from 'djinn-state-history';
import { createBrowserHistory } from 'history';
import { djinn } from './djinn';
import './djinnServices';

const history = createBrowserHistory();
const service = djinn.getService(HistoryService);
service.setHistory(history);

service.push('/home');

Keywords

FAQs

Package last updated on 27 Dec 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc