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

0http

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

0http - npm Package Compare versions

Comparing version 3.3.0 to 3.4.0

2

lib/router/sequential.js

@@ -29,3 +29,3 @@ const Trouter = require('trouter')

const isCacheEnabled = config.cacheSize > 0
const cache = isCacheEnabled ? new LRU(config.cacheSize) : null
const cache = isCacheEnabled ? new LRU({ max: config.cacheSize }) : null
const router = new Trouter()

@@ -32,0 +32,0 @@ router.id = config.id

@@ -1,18 +0,16 @@

const qs = require('querystring')
module.exports = (req, url) => {
const [path, search] = url.split('?')
req.path = path
switch (search) {
case undefined:
case '': {
req.search = '?'
req.query = {}
break
const [path, search = ''] = url.split('?')
const searchParams = new URLSearchParams(search.replaceAll('[]=', '='))
const query = {}
for (const [name, value] of searchParams.entries()) {
if (query[name]) {
Array.isArray(query[name])
? query[name].push(value)
: (query[name] = [query[name], value])
} else {
query[name] = value
}
default: {
req.search = '?' + search
req.query = qs.parse(search.replace(/\[\]=/g, '='))
}
}
req.path = path
req.query = query
}
{
"name": "0http",
"version": "v3.3.0",
"version": "v3.4.0",
"description": "Cero friction HTTP request router. The need for speed!",

@@ -46,3 +46,3 @@ "main": "index.js",

"dependencies": {
"lru-cache": "^6.0.0",
"lru-cache": "^7.10.1",
"regexparam": "^2.0.0",

@@ -49,0 +49,0 @@ "trouter": "^3.2.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