Home > @rushstack/lookup-by-path > IReadonlyLookupByPath > [Symbol.iterator]
IReadonlyLookupByPath.[Symbol.iterator]() 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.
Iterates over the entries in this trie.
Signature:
[Symbol.iterator](query?: string, delimiter?: string): IterableIterator<[string, TItem]>;
Parameters
Parameter | Type | Description |
|---|---|---|
query | string | (Optional) An optional query. If specified only entries that start with the query will be returned. |
delimiter | string | (Optional) |
Returns:
IterableIterator<[string, TItem]>
An iterator over the entries under the specified query (or the root if no query is specified).
Remarks
Keys in the returned iterator use the provided delimiter to join segments. Iteration order is not specified.