Protected Optional_toThe converter used to transform a raw element (R) into a public element (E).
Protected_total(Protected) Get total count for base class iteration.
Total number of elements.
Get whether comparisons are case-sensitive.
True if case-sensitive.
Get the number of stored words.
Word count.
Protected_caseProtected_create(Protected) Create an empty instance of the same concrete class.
Optionaloptions: TrieOptions<R>Options forwarded to the constructor.
An empty like-kind trie instance.
Protected_createProtected_getProtected_spawnReturns an iterator over the structure's elements.
Rest...args: unknown[]Optional iterator arguments forwarded to the internal iterator.
An IterableIterator<E> that yields the elements in traversal order.
Insert many words from an iterable.
Iterable of strings (or raw records if toElementFn is provided).
Array of per-word 'added' flags.
Tests whether all elements satisfy the predicate.
Function invoked for each element with signature (value, index, self).
OptionalthisArg: unknownOptional this binding for the predicate.
true if every element passes; otherwise false.
Filter words into a new trie of the same class.
Predicate (word, index, trie) → boolean to keep word.
OptionalthisArg: anyValue for this inside the predicate.
A new trie containing words that satisfy the predicate.
Finds the first element that satisfies the predicate and returns it.
Finds the first element of type S (a subtype of E) that satisfies the predicate and returns it.
The matched element typed as S, or undefined if not found.
Invokes a callback for each element in iteration order.
Function invoked per element with signature (value, index, self).
OptionalthisArg: unknownOptional this binding for the callback.
void.
Collect words under a prefix up to a maximum count.
Optionalprefix: string = ''Prefix to match; default empty string for root.
Optionalmax: number = Number.MAX_SAFE_INTEGERMaximum number of words to return; default is Number.MAX_SAFE_INTEGER.
OptionalisAllWhenEmptyPrefix: boolean = falseWhen true, collect from root even if prefix is empty.
Array of collected words (at most max).
Maps each element to a new element and returns a new iterable structure.
A new IterableElementBase<EM, RM> containing mapped elements.
Map words into a new trie (possibly different record type).
A new Trie constructed from mapped words.
Map words into a new trie of the same element type.
Mapping function (word, index, trie) → string.
OptionalthisArg: anyValue for this inside the callback.
A new trie with mapped words.
Tests whether at least one element satisfies the predicate.
Function invoked for each element with signature (value, index, self).
OptionalthisArg: unknownOptional this binding for the predicate.
true if any element passes; otherwise false.
Prefix tree (Trie) for fast prefix queries and word storage.
Remarks
Time O(1), Space O(1)
Example
Example
Example
Example
Example