---
lang: en
title: 'API docs: context.filterbytag'
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.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): BindingTagFilter;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  tagPattern | [BindingTag](./context.bindingtag.md) \| RegExp | Binding tag name, regexp, or object |

<b>Returns:</b>

[BindingTagFilter](./context.bindingtagfilter.md)


