File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,10 @@ function logRoutes(data: Data) {
101101
102102const kaomojis = [ '♡⸜(˶˃ ᵕ ˂˶)⸝♡' , '♡( ◡‿◡ )' , '( ˶ˆ ᗜ ˆ˵ )' , '(˶ᵔ ᵕ ᵔ˶)' ]
103103
104- // Get system current language
104+ function randomItem ( items : string [ ] ) : string {
105+ const index = Math . floor ( Math . random ( ) * items . length )
106+ return items . at ( index ) ?? ''
107+ }
105108
106109app . listen ( port , ( ) => {
107110 console . log (
@@ -110,7 +113,7 @@ app.listen(port, () => {
110113 chalk . gray ( 'Press CTRL-C to stop' ) ,
111114 chalk . gray ( `Watching ${ file } ...` ) ,
112115 '' ,
113- chalk . magenta ( kaomojis [ Math . floor ( Math . random ( ) * kaomojis . length ) ] ) ,
116+ chalk . magenta ( randomItem ( kaomojis ) ) ,
114117 '' ,
115118 chalk . bold ( 'Index:' ) ,
116119 chalk . gray ( `http://localhost:${ port } /` ) ,
You can’t perform that action at this time.
0 commit comments