File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ function formatDownloads(count?: number): string {
2727function formatDate(dateStr ? : string ): string {
2828 if (! dateStr ) return ' -'
2929 const date = new Date (dateStr )
30+ if (Number .isNaN (date .getTime ())) return ' -'
3031 const now = new Date ()
3132 const diffMs = now .getTime () - date .getTime ()
3233 const diffSeconds = Math .floor (diffMs / 1000 )
Original file line number Diff line number Diff line change @@ -226,9 +226,9 @@ export function useStructuredFilters(options: UseStructuredFiltersOptions) {
226226
227227 function matchesKeywords ( pkg : NpmSearchResult , keywords : string [ ] ) : boolean {
228228 if ( keywords . length === 0 ) return true
229- const pkgKeywords = pkg . package . keywords ?? [ ]
230- // AND logic: package must have ALL selected keywords
231- return keywords . every ( k => pkgKeywords . includes ( k ) )
229+ const pkgKeywords = new Set ( ( pkg . package . keywords ?? [ ] ) . map ( k => k . toLowerCase ( ) ) )
230+ // AND logic: package must have ALL selected keywords (case-insensitive)
231+ return keywords . every ( k => pkgKeywords . has ( k . toLowerCase ( ) ) )
232232 }
233233
234234 function matchesSecurity ( pkg : NpmSearchResult , security : SecurityFilter ) : boolean {
You can’t perform that action at this time.
0 commit comments