@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
67 lines (36 loc) • 1.16 kB
Markdown
---
lang: en
title: 'API docs: rest.trie.match'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.trie.match.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [Trie](./rest.trie.md) > [match](./rest.trie.match.md)
## Trie.match() method
Match a route path against the trie
**Signature:**
```typescript
match(path: string): (ResolvedNode<T> & {
node: NodeWithValue<T>;
}) | undefined;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
path
</td><td markdown="1">
string
</td><td markdown="1">
The route path, such as `/customers/c01`
</td></tr>
</tbody></table>
**Returns:**
([ResolvedNode](./rest.resolvednode.md)<!-- --><T> & { node: [NodeWithValue](./rest.nodewithvalue.md)<!-- --><T>; }) \| undefined