Home > @rushstack/lookup-by-path > IReadonlyLookupByPath > getNodeAtPrefix
IReadonlyLookupByPath.getNodeAtPrefix() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Retrieves the trie node at the specified prefix, if it exists.
Signature:
getNodeAtPrefix(query: string, delimiter?: string): IReadonlyPathTrieNode<TItem> | undefined;
Parameters
Parameter | Type | Description |
|---|---|---|
query | string | The prefix to check for |
delimiter | string | (Optional) The path delimiter |
Returns:
IReadonlyPathTrieNode<TItem> | undefined
The trie node at the specified prefix, or undefined if no node was found