Skip to main content
Module

x/lru/mod.ts>default#filter

Simple and powerful LRU cache for Deno
Latest
method default.prototype.filter
import { default } from "https://deno.land/x/lru@1.0.2/mod.ts";

Creates a new array with all elements that pass the test implemented by the provided function

Parameters

callbackfn: (
value: [string, T],
index: number,
array: [string, T][],
) => T

Function is a predicate, to test each element of the array. Return true to keep the element, false otherwise

optional
thisArg: unknown

Value to use as this when executing callback.

Returns

[string, T][]