New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pinnacle0/react-stack-router

Package Overview
Dependencies
Maintainers
5
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pinnacle0/react-stack-router - npm Package Compare versions

Comparing version 0.1.3-beta.40 to 0.1.3-beta.41

6

dist/stackRouter/index.js

@@ -27,3 +27,3 @@ import { Action } from "history";

const { pathname, hash, search } = window.location;
const matched = this.matchRoute(pathname, true);
const matched = this.matchRoute(pathname);
let numOfParentComponent = 0;

@@ -108,7 +108,5 @@ let parentPattern = matched.payload.pattern.parent;

}
matchRoute(to, allowFallbackMatch = false) {
matchRoute(to) {
const pathname = typeof to === "string" ? to : to.pathname;
const matched = this.route.lookup(pathname ?? window.location.pathname);
if (!allowFallbackMatch)
return matched?.fallback ? null : matched;
invariant(matched, `None of the route match current pathname:${pathname}. Please make sure you have defined fallback route using "**"`);

@@ -115,0 +113,0 @@ return matched;

{
"name": "@pinnacle0/react-stack-router",
"version": "0.1.3-beta.40",
"version": "0.1.3-beta.41",
"author": "Pinnacle",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -59,3 +59,3 @@ import {Action} from "history";

const {pathname, hash, search} = window.location;
const matched = this.matchRoute(pathname, true);
const matched = this.matchRoute(pathname);

@@ -158,9 +158,5 @@ let numOfParentComponent = 0;

private matchRoute(to: To): Match<StackRoutePayload> | null;
private matchRoute(to: To, allowFallbackMatch: true): Match<StackRoutePayload>;
private matchRoute(to: To, allowFallbackMatch: boolean = false): Match<StackRoutePayload> | null {
private matchRoute(to: To): Match<StackRoutePayload> {
const pathname = typeof to === "string" ? to : to.pathname;
const matched = this.route.lookup(pathname ?? window.location.pathname);
if (!allowFallbackMatch) return matched?.fallback ? null : matched;
invariant(matched, `None of the route match current pathname:${pathname}. Please make sure you have defined fallback route using "**"`);

@@ -167,0 +163,0 @@ return matched;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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