Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/question/text-util.ts>textSearch

A module for deno to make interactive prompts in the terminal
Latest
function textSearch
import { textSearch } from "https://deno.land/x/question@0.0.2/text-util.ts";

Searches with the given search string for items that matches it. It sorts the returned items where the most specific item is first and the least specific is last. If an item does not have any matching qualities it is left out.

Parameters

searchString: string

The free text string that is searched for.

items: T[]

All items that the search is within.

optional
options: TextSearchOptions<T>

Returns

The items that matches the search string in a order of most specific to least specific.