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

can-route

Package Overview
Dependencies
Maintainers
5
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-route - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

2

can-route.js

@@ -33,3 +33,3 @@ /*jshint -W079 */

// Any word character or a period is matched.
var curliesMatcher = /\{([\w.]+)\}/g;
var curliesMatcher = /\{\s*([\w.]+)\s*\}/g;
var colonMatcher = /\:([\w.]+)/g;

@@ -36,0 +36,0 @@ // Regular expression for identifying &key=value lists.

{
"name": "can-route",
"version": "3.0.3",
"version": "3.0.4",
"description": "",

@@ -5,0 +5,0 @@ "homepage": "",

@@ -1064,1 +1064,33 @@ /* jshint asi:true */

}
test("param with whitespace in interpolated string (#45)", function () {
canRoute.routes = {};
canRoute("{ page }", {
page: "index"
})
var res = canRoute.param({
page: "index"
});
equal(res, "")
canRoute("pages/{ p1 }/{ p2 }/{ p3 }", {
p1: "index",
p2: "foo",
p3: "bar"
})
res = canRoute.param({
p1: "index",
p2: "foo",
p3: "bar"
});
equal(res, "pages///")
res = canRoute.param({
p1: "index",
p2: "baz",
p3: "bar"
});
equal(res, "pages//baz/")
});
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