Skip to content

searchItems beta ​

Function of @v12-engine/client/kit

ts
export declare function searchItems(source: ItemsSource, query: string, options?: ItemSearchOptions): SearchHit<ItemDef>[];

Searches a game's items (registry.items) by what is typed: their names (first), ids, tags and the tags' names, the stats they give (crit finds what gives critChance), the callings they suit, their descriptions, with a typo found after what is found as typed (greves is Greaves). Tags typed (#lifesteal, tag:lifesteal) and tags are what every item found has; tier and calling narrow it further. Nothing typed gives every item that fits, in the game's order. Keeps its index between keystrokes, made again when the items change

ts
searchItems(client.registry, '#boots spe', { calling: 'ranger' }).map((hit) => hit.item.name)