Page Contents

Home > @loopback/context > filterByKey

filterByKey() function

Create a binding filter from key pattern

Signature:

export declare function filterByKey(keyPattern?: string | RegExp | BindingFilter): BindingFilter;

Parameters

Parameter Type Description
keyPattern string | RegExp | BindingFilter (Optional) Binding key/wildcard, regexp, or a filter function

Returns:

BindingFilter