Skip to content

Commit ba1ab9c

Browse files
authored
refactor: reduce bundle size (#6)
1 parent aa0de01 commit ba1ab9c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pico.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function defineDynamicClass(): {
1010
}
1111

1212
class Pico extends defineDynamicClass() {
13-
private routes: {
13+
private r: {
1414
pattern: URLPattern
1515
method: string
1616
handler: Handler
@@ -30,7 +30,7 @@ class Pico extends defineDynamicClass() {
3030
method: method.toLowerCase(),
3131
handler,
3232
}
33-
this.routes.push(route)
33+
this.r.push(route)
3434
return this
3535
}
3636

@@ -39,7 +39,7 @@ class Pico extends defineDynamicClass() {
3939
url: string
4040
): { handler: Handler; result: URLPatternURLPatternResult } {
4141
method = method.toLowerCase()
42-
for (const route of this.routes) {
42+
for (const route of this.r) {
4343
const match = route.pattern.exec(url)
4444
if ((match && route.method === 'all') || (match && route.method === method)) {
4545
return { handler: route.handler, result: match }

0 commit comments

Comments
 (0)