@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
35 lines (22 loc) • 1.56 kB
Markdown
---
lang: en
title: 'API docs: context.context.findbytag'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.context.findbytag.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [Context](./context.context.md) > [findByTag](./context.context.findbytag.md)
## Context.findByTag() method
Find bindings using the tag filter. If the filter matches one of the binding tags, the binding is included.
<b>Signature:</b>
```typescript
findByTag<ValueType = BoundValue>(tagFilter: BindingTag | RegExp): Readonly<Binding<ValueType>>[];
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| tagFilter | [BindingTag](./context.bindingtag.md) \| RegExp | A filter for tags. It can be in one of the following forms: - A regular expression, such as <code>/controller/</code> - A wildcard pattern string with optional <code>*</code> and <code>?</code>, such as <code>'con*'</code> For a wildcard: - <code>*</code> matches zero or more characters except <code>.</code> and <code>:</code> - <code>?</code> matches exactly one character except <code>.</code> and <code>:</code> - An object containing tag name/value pairs, such as <code>{name: 'my-controller'}</code> |
<b>Returns:</b>
Readonly<[Binding](./context.binding.md)<!-- --><ValueType>>\[\]