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
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- valuerequiredstring | number
- The item value to search within. Converted to lowercase string before comparison.
- queryrequiredstring | number
- The search term. Converted to lowercase string before comparison.
API
Return value
The value returned by this 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
Examples
Ready-to-paste usage snippets.
Substring match