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

sse

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sse - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

11

lib/sse.js

@@ -8,2 +8,6 @@ var Options = require('options')

RegExp.quote = function(str) {
return (str+'').replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
};
module.exports = SSE;

@@ -24,3 +28,3 @@ module.exports.Client = SSEClient;

var pathname = u.pathname.replace(/^\/{2,}/, '/');
if (pathname == options.value.path && (options.value.verifyRequest == null || options.value.verifyRequest(req))) {
if (self.matchesPath(pathname, options.value.path) && (options.value.verifyRequest == null || options.value.verifyRequest(req))) {
self.handleRequest(req, res, u.query);

@@ -43,1 +47,6 @@ }

}
SSE.prototype.matchesPath = function(queryPath, matchPath) {
var match = RegExp.quote(matchPath).replace('\\*', '.*');
return RegExp('^' + match + '$').test(queryPath);
}

2

package.json
{
"author": "Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)",
"name": "sse",
"version": "0.0.7",
"version": "0.0.8",
"keywords": [

@@ -6,0 +6,0 @@ "real-time",

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