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

overalls

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

overalls - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

examples/simple.js

@@ -5,3 +5,3 @@ var http = require("http");

//parameters are between {curlybraces}
var routes = ["GET /", "GET /dogs/{dog}", "GET /cats/{cat}"];
var routes = ["GET /", "GET /dogs/{dog}", "GET /cats/{cat}", "GET /boing"];

@@ -8,0 +8,0 @@ //overalls is configured with an array or object with paths

@@ -8,3 +8,4 @@ function splitPath (path) {

if (!routeSegment || !requestSegment) {
if (typeof routeSegment === "undefined" || typeof requestSegment === "undefined") {
return false;

@@ -62,5 +63,7 @@ }

var i, match, il = requestSegments.length;
if(requestSegments.length !== routeSegments.length) {
return;
}
for (i = 0; i < il; i += 1) {

@@ -76,3 +79,4 @@ match = compareSegments(routeSegments[i], requestSegments[i]);

}
if (i === il-1 && match) {
if ((i === (il-1)) && match) {
req.match = routeSegments.join("/");

@@ -79,0 +83,0 @@ }

{
"name": "overalls",
"version": "1.0.1",
"version": "1.0.2",
"description": "Decorate HTTP requests with path parameters",

@@ -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