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

@storeon/router

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storeon/router - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

3

CHANGELOG.md
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).
## 1.2.0
* Improve types.
## 1.1.0

@@ -5,0 +8,0 @@ * Fix click on child elements.

import { StoreonModule } from "storeon";
declare namespace createRouter{
export type RoutesState<MatchParams> = {
[routerKey]: {
match: MatchParams | boolean,
path: string,
params: string[],
}
}
}
export type Path = string | RegExp;
export type Callback = (...props: string[]) => unknown;
export type Route = [Path, Callback];
export type Callback<MatchParams> = (...props: string[]) => MatchParams;
export type Route<MatchParam> = [Path, Callback<MatchParam>];
export function createRouter<State = unknown>(routes: Route[]): StoreonModule<State>;
export function createRouter<MatchParam>(routes: Route<MatchParam>[]): StoreonModule<createRouter.RoutesState<MatchParam>>;

@@ -9,0 +19,0 @@ export const routerKey: unique symbol;

2

package.json
{
"name": "@storeon/router",
"version": "1.1.0",
"version": "1.2.0",
"description": "Storeon module for URL routing",

@@ -5,0 +5,0 @@ "main": "index.cjs",

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