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 - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

4

package.json
{
"name": "djinn-state-history",
"version": "0.0.1",
"version": "0.0.2",
"description": "Djinn-state history integration",

@@ -37,3 +37,3 @@ "main": "dist/index.js",

"dependencies": {
"djinn-state": "^1.2.1",
"djinn-state": "^1.3.0",
"history": "^4.7.2"

@@ -40,0 +40,0 @@ },

@@ -25,3 +25,3 @@ import { Action, createMemoryHistory, Location } from 'history';

expect((<any>service)._history).toBe(history);
expect((service as any)._history).toBe(history);
});

@@ -57,3 +57,3 @@

(<any>service).__checkRoute({} as any, {} as any);
(service as any).__checkRoute({} as any, {} as any);

@@ -72,3 +72,3 @@ expect(console.error).toBeCalled();

(<any>service).__checkRoute({} as any, {} as any);
(service as any).__checkRoute({} as any, {} as any);

@@ -87,3 +87,3 @@ expect(history.goBack).toBeCalled();

(<any>service).__checkRoute({} as any, {} as any);
(service as any).__checkRoute({} as any, {} as any);

@@ -90,0 +90,0 @@ expect(history.goBack).not.toBeCalled();

@@ -11,3 +11,3 @@ import { createMemoryHistory } from 'history';

expect((<any>service)._history).toBe(history);
expect((service as any)._history).toBe(history);

@@ -91,3 +91,3 @@ const historyState: any[] = service.state.entries;

pathname: '/path',
search: 'ok'
search: 'ok',
};

@@ -130,3 +130,3 @@

pathname: '/path',
search: 'ok'
search: 'ok',
};

@@ -211,3 +211,3 @@

pathname: '/path',
search: 'ok'
search: 'ok',
};

@@ -214,0 +214,0 @@

import { DjinnService } from 'djinn-state';
import { Action, History, Location, LocationState, UnregisterCallback } from 'history';
export class HistoryBlockerService extends DjinnService{
export class HistoryBlockerService extends DjinnService {
private _history?: History<LocationState>;

@@ -6,0 +6,0 @@ private _unregister?: UnregisterCallback;

@@ -8,6 +8,6 @@ import { DjinnService } from 'djinn-state';

TransitionPromptHook,
UnregisterCallback
UnregisterCallback,
} from 'history';
export class HistoryService extends DjinnService{
export class HistoryService extends DjinnService {
private _history?: History<LocationState>;

@@ -67,3 +67,3 @@ private _unregister?: UnregisterCallback;

return (<any>this._history)[functionName].apply(this, args);
return (this._history as any)[functionName].apply(this, args);
};

@@ -70,0 +70,0 @@

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