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

cmdo-router

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmdo-router - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

2

dist/Router.d.ts

@@ -6,4 +6,4 @@ import type { History, Location } from "./History";

export declare class Router {
readonly history: History;
readonly base: string;
readonly history: History;
routes: Route[];

@@ -10,0 +10,0 @@ query: Query;

@@ -46,5 +46,5 @@ "use strict";

function Router(history, _a) {
var _b = (_a === void 0 ? {} : _a).base, base = _b === void 0 ? "" : _b;
var base = (_a === void 0 ? {} : _a).base;
this.routes = [];
this.base = base;
this.base = getBase(base);
this.history = history;

@@ -148,3 +148,3 @@ this.query = new Query_1.Query(history);

if (state === void 0) { state = {}; }
this.history.push(this.base + path, state);
this.history.push((this.base + path.replace(this.base, "")).replace(/\/$/, ""), state);
};

@@ -175,1 +175,7 @@ Router.prototype.get = function (path) {

}
function getBase(path) {
if (!path || path === "" || path === "/") {
return "";
}
return path;
}
{
"name": "cmdo-router",
"description": "Framework agnostic routing solution for single page web applications.",
"version": "1.2.2",
"version": "1.2.3",
"author": "Christoffer Rodvik <christoffer@kodemon.net>",

@@ -18,2 +18,3 @@ "license": "MIT",

"build": "rm -rf ./dist && tsc",
"dev": "tsc --watch",
"test": "node --inspect node_modules/.bin/jest --runInBand --verbose"

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