@loopback/docs
Version:
Documentation for LoopBack 4
38 lines (25 loc) • 1.03 kB
Markdown
lang: en
title: 'API docs: rest.trie'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.rest.trie.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [Trie](./rest.trie.md)
## Trie class
An implementation of trie for routes. The key hierarchy is built with parts of the route path delimited by `/`
<b>Signature:</b>
```typescript
export declare class Trie<T>
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [root](./rest.trie.root.md) | | <code>Node<T></code> | |
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [create(routeTemplate, value)](./rest.trie.create.md) | | Create a node for a given path template |
| [list()](./rest.trie.list.md) | | List all nodes with value of the trie |
| [match(path)](./rest.trie.match.md) | | Match a route path against the trie |