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

@solidjs/router

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solidjs/router - npm Package Compare versions

Comparing version 0.13.3 to 0.13.4

2

dist/components.jsx

@@ -23,3 +23,3 @@ import { createMemo, mergeProps, splitProps } from "solid-js";

const loc = normalizePath(location.pathname).toLowerCase();
return [props.end ? path === loc : loc.startsWith(path), path === loc];
return [props.end ? path === loc : loc.startsWith(path + "/") || loc === path, path === loc];
});

@@ -26,0 +26,0 @@ return (<a {...rest} href={href() || props.href} state={JSON.stringify(props.state)} classList={{

@@ -7,2 +7,2 @@ export * from "./routers/index.js";

export * from "./data/index.js";
export type { Location, LocationChange, NavigateOptions, Navigator, OutputMatch, Params, RouteSectionProps, RouteLoadFunc, RouteLoadFuncArgs, RouteDefinition, RouterIntegration, RouterUtils, SetParams, BeforeLeaveEventArgs } from "./types.js";
export type { Location, LocationChange, MatchFilter, MatchFilters, NavigateOptions, Navigator, OutputMatch, Params, PathMatch, RouteSectionProps, RouteLoadFunc, RouteLoadFuncArgs, RouteDefinition, Route, RouteMatch, RouterIntegration, RouterUtils, SetParams, BeforeLeaveEventArgs } from "./types.js";

@@ -259,3 +259,3 @@ import { isServer, getRequestEvent, createComponent as createComponent$1, memo, delegateEvents, spread, mergeProps as mergeProps$1, template } from 'solid-js/web';

};
const useCurrentMatches = () => useRouter().matches();
const useCurrentMatches = () => useRouter().matches;
const useParams = () => useRouter().params;

@@ -1378,3 +1378,3 @@ const useSearchParams = () => {

} else {
window.location.hash = value;
window.history.pushState(state, "", "#" + value);
}

@@ -1471,3 +1471,3 @@ const hashIndex = value.indexOf("#");

const loc = normalizePath(location.pathname).toLowerCase();
return [props.end ? path === loc : loc.startsWith(path), path === loc];
return [props.end ? path === loc : loc.startsWith(path + "/") || loc === path, path === loc];
});

@@ -1474,0 +1474,0 @@ return (() => {

@@ -25,3 +25,3 @@ import { setupNativeEvents } from "../data/events.js";

else {
window.location.hash = value;
window.history.pushState(state, "", "#" + value);
}

@@ -28,0 +28,0 @@ const hashIndex = value.indexOf("#");

@@ -13,3 +13,3 @@ import { JSX, Accessor } from "solid-js";

export declare const useMatch: <S extends string>(path: () => S, matchFilters?: MatchFilters<S> | undefined) => Accessor<import("./types.js").PathMatch | undefined>;
export declare const useCurrentMatches: () => RouteMatch[];
export declare const useCurrentMatches: () => () => RouteMatch[];
export declare const useParams: <T extends Params>() => T;

@@ -16,0 +16,0 @@ export declare const useSearchParams: <T extends Params>() => [Partial<T>, (params: SetParams, options?: Partial<NavigateOptions>) => void];

@@ -37,3 +37,3 @@ import { runWithOwner } from "solid-js";

};
export const useCurrentMatches = () => useRouter().matches();
export const useCurrentMatches = () => useRouter().matches;
export const useParams = () => useRouter().params;

@@ -40,0 +40,0 @@ export const useSearchParams = () => {

@@ -68,3 +68,3 @@ import type { Component, JSX, Signal } from "solid-js";

location: Location;
data?: T;
data: T;
children?: JSX.Element;

@@ -71,0 +71,0 @@ }

@@ -9,3 +9,3 @@ {

"license": "MIT",
"version": "0.13.3",
"version": "0.13.4",
"homepage": "https://github.com/solidjs/solid-router#readme",

@@ -12,0 +12,0 @@ "repository": {

@@ -871,3 +871,3 @@ <p>

const matches = useCurrentMatches();
const breadcrumbs = createMemo(() => matches.map(m => m.route.info.breadcrumb))
const breadcrumbs = createMemo(() => matches().map(m => m.route.info.breadcrumb))
```

@@ -874,0 +874,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