mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-31 23:16:41 +00:00 
			
		
		
		
	✨ Docs: 商店搜索大小写不敏感 (#1609)
This commit is contained in:
		| @@ -17,14 +17,16 @@ export type Obj = { | ||||
| }; | ||||
|  | ||||
| export function filterObjs(filter: string, objs: Obj[]): Obj[] { | ||||
|   let filterLower = filter.toLowerCase(); | ||||
|   return objs.filter((o) => { | ||||
|     return ( | ||||
|       o.module_name?.includes(filter) || | ||||
|       o.project_link?.includes(filter) || | ||||
|       o.name.includes(filter) || | ||||
|       o.desc.includes(filter) || | ||||
|       o.author.includes(filter) || | ||||
|       o.tags.filter((t) => t.label.includes(filter)).length > 0 | ||||
|       o.module_name?.toLowerCase().includes(filterLower) || | ||||
|       o.project_link?.toLowerCase().includes(filterLower) || | ||||
|       o.name.toLowerCase().includes(filterLower) || | ||||
|       o.desc.toLowerCase().includes(filterLower) || | ||||
|       o.author.toLowerCase().includes(filterLower) || | ||||
|       o.tags.filter((t) => t.label.toLowerCase().includes(filterLower)).length > | ||||
|         0 | ||||
|     ); | ||||
|   }); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user