Page Contents

Home > @loopback/rest > Trie

Trie class

An implementation of trie for routes. The key hierarchy is built with parts of the route path delimited by /

Signature:

export declare class Trie<T> 

Properties

Property Modifiers Type Description
[root](/doc/en/lb4/apidocs.rest.trie.root.html) `readonly` [Node](/doc/en/lb4/apidocs.rest.node.html)<T>

Methods

Method Modifiers Description
[create(routeTemplate, value)](/doc/en/lb4/apidocs.rest.trie.create.html) Create a node for a given path template
[list()](/doc/en/lb4/apidocs.rest.trie.list.html) List all nodes with value of the trie
[match(path)](/doc/en/lb4/apidocs.rest.trie.match.html) Match a route path against the trie