defaultFilter

Commons
stable

Case-insensitive substring search. Returns the index of the query inside the stringified value, or -1 when there is no match or either argument is null.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

value
requis
string | number
The item value to search within. Converted to lowercase string before comparison.
query
requis
string | number
The search term. Converted to lowercase string before comparison.

API

Valeur de retour

La valeur retournée par cet util.

The index of the first occurrence of query in value (locale-insensitive), or -1 when not found or when either argument is null.

Usage

Exemples

Extraits de code prêts à coller.

Substring match

typescript