---
lang: en
title: 'API docs: context.filterbytag'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.context.filterbytag.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [filterByTag](./context.filterbytag.md)

## filterByTag() function

Create a binding filter for the tag pattern

<b>Signature:</b>

```typescript
export declare function filterByTag(tagPattern: BindingTag | RegExp): BindingFilter;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  tagPattern | <code>BindingTag &#124; RegExp</code> | Binding tag name, regexp, or object |

<b>Returns:</b>

`BindingFilter`


