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

esroute

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esroute - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

21

dist/index.js

@@ -117,15 +117,24 @@ var __defProp = Object.defineProperty;

var traverseRoutes = async (routes, opts) => {
var _a;
let route = routes;
for (const part of opts.path) {
if (route === null || typeof route === "function")
if (typeof route === "function")
return null;
const child = getRouteChild(route, opts, part);
const guardResult = await ((_a = route["?"]) == null ? void 0 : _a.call(route, opts));
if (guardResult instanceof NavOpts)
return () => guardResult;
if (child === null)
return null;
const gr2 = await checkGuard(route, opts);
if (gr2)
return gr2;
route = child;
}
return route;
if (typeof route === "function")
return route;
const gr = await checkGuard(route, opts);
return gr || route;
};
var checkGuard = (route, opts) => {
if (!("?" in route))
return false;
return Promise.resolve(route["?"](opts)).then((gr) => gr instanceof NavOpts && (() => gr));
};
var getRouteChild = (route, opts, part) => {

@@ -132,0 +141,0 @@ if (part in route)

{
"name": "esroute",
"version": "0.4.1",
"version": "0.4.2",
"description": "A small efficient framework-agnostic client-side routing library, written in TypeScript.",
"types": "dist/index.d.ts",
"main": "dist/index.js",

@@ -6,0 +7,0 @@ "scripts": {

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