Skip to content

Commit 719d3c0

Browse files
committed
feat: middleware detector
1 parent 7c36012 commit 719d3c0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/middleware.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export function detectMiddlewareName(code: string) {
2+
const match = code.match(/middleware:\s*(\w+)/);
3+
return match ? match[1] : null;
4+
}

0 commit comments

Comments
 (0)