@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
37 lines (24 loc) • 998 B
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
<b>Signature:</b>
```typescript
match(path: string): (ResolvedNode<T> & {
node: NodeWithValue<T>;
}) | undefined;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| path | string | The route path, such as <code>/customers/c01</code> |
<b>Returns:</b>
([ResolvedNode](./rest.resolvednode.md)<!-- --><T> & { node: [NodeWithValue](./rest.nodewithvalue.md)<!-- --><T>; }) \| undefined