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

@based/server

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@based/server - npm Package Compare versions

Comparing version 4.5.1 to 4.5.2

39

dist/createSimpleServer.js

@@ -135,17 +135,2 @@ "use strict";

}
const getRoute = (path, name, specs) => {
let rootFn;
if (path) {
for (const name in specs) {
const fnPath = specs[name].path;
if (fnPath === path) {
return specs[name];
}
if (!rootFn && fnPath === '/') {
rootFn = specs[name];
}
}
}
return specs[name] || rootFn || null;
};
const properProps = {

@@ -170,4 +155,24 @@ ...props,

route: ({ server, path, name }) => {
return (getRoute(path, name, functionStore) ||
getRoute(path, name, server.functions.specs));
let rootFn;
if (path) {
for (const name in functionStore) {
const fnPath = functionStore[name].path;
if (fnPath === path) {
return functionStore[name];
}
if (!rootFn && fnPath === '/') {
rootFn = functionStore[name];
}
}
for (const name in server.functions.specs) {
const fnPath = server.functions.specs[name].path;
if (fnPath === path) {
return server.functions.specs[name];
}
if (!rootFn && fnPath === '/') {
rootFn = server.functions.specs[name];
}
}
}
return (functionStore[name] || server.functions.specs[name] || rootFn || null);
},

@@ -174,0 +179,0 @@ },

{
"name": "@based/server",
"version": "4.5.1",
"version": "4.5.2",
"license": "MIT",

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

Sorry, the diff of this file is not supported yet

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