UNPKG
flru
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
0.0.0
A tiny (215B) and fast Least Recently Used (LRU) cache
github.com/lukeed/flru
lukeed/flru
flru
/
flru.d.ts
11 lines
(8 loc)
•
258 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
export
interface
flruCache<T =
any
> {
clear
(
isPartial
:
boolean
):
void
;
has
(
key
:
string
):
boolean
;
get
(
key
:
string
):
undefined
| T;
set
(
key
:
string
,
value
: T):
void
; }
declare
const
flru
: <T =
any
>
(
max
:
number
) =>
flruCache<T>;
export
default
flru;