Skip to content

iconify-cli / api / searchIcon

Function: searchIcon()

searchIcon(config, search, prefixes, limit, offset): Promise<IconifySearchResult>

Defined in: src/lib/api.ts:207

Searches for an icon based on the given parameters.

Parameters

config

Config

The configuration object containing API host details

string

The search term to query for icons

prefixes

string[]

A list of prefixes to filter the collections

limit

number

The maximum number of results to return

offset

number

The starting index for the search results

Returns

Promise<IconifySearchResult>

A object containing information about the search result

Throws

If the request failed

Throws

If the response cannot be parsed