UNPKG

@loopback/docs

Version:
34 lines (21 loc) 1.4 kB
--- lang: en title: 'API docs: context.context.findbytag' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.context.context.findbytag.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [Context](./context.context.md) &gt; [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 | <code>BindingTag &#124; RegExp</code> | 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<ValueType>>[]`