MCPcopy Create free account
hub / github.com/avoidwork/tenso / checkRouteProtection

Function checkRouteProtection

benchmarks/auth.js:291–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289
290 // Mock protection check function
291 const checkRouteProtection = url => {
292 // Check unprotect patterns first
293 for (const pattern of unprotectPatterns) {
294 if (pattern.test(url)) return { protected: false, reason: "unprotected" };
295 }
296
297 // Check protect patterns
298 for (const pattern of protectPatterns) {
299 if (pattern.test(url)) return { protected: true, reason: "protected" };
300 }
301
302 return { protected: false, reason: "default" };
303 };
304
305 suite
306 .add("Route protection - Single URL check", () => {

Callers 1

benchmarkRouteProtectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected