Mfilter
Bun

method

crypto.Hmac.filter

fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,

This method allows filtering the stream. For each chunk in the stream the fn function will be called and if it returns a truthy value, the chunk will be passed to the result stream. If the fn function returns a promise - that promise will be awaited.

@param fn

a function to filter chunks from the stream. Async or not.

@returns

a stream filtered with the predicate fn.