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

routr

Package Overview
Dependencies
Maintainers
5
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

routr - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

4

CHANGELOG.md
# Change Log
## 2.0.1
* [#35] Fix decodeURIComponent of undefined bug
## 2.0.0

@@ -4,0 +8,0 @@

26

lib/router.js

@@ -93,18 +93,16 @@ /**

// remove query string and hash fragment from url
var pos = url.indexOf('?');
var path;
if (pos >= 0) {
// remove query string
path = url.substring(0, pos);
} else {
pos = url.indexOf('#');
//
// hash fragment does not get sent to server.
// But since routr can be used on both server and client,
// we should remove hash fragment before matching the regex.
var path = url;
var pos;
// Leave `pos` at the beginning of the query-string, if any.
['#', '?'].forEach(function(delimiter){
pos = path.indexOf(delimiter);
if (pos >= 0) {
// hash fragment does not get sent to server.
// But since routr can be used on both server and client,
// we should remove hash fragment before matching the regex.
path = url.substring(0, pos);
} else {
path = url;
path = path.substring(0, pos);
}
}
});

@@ -111,0 +109,0 @@ var pathMatches = self.regexp.exec(path);

{
"name": "routr",
"version": "2.0.1",
"version": "2.0.2",
"description": "A router for both server and client",

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

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