UNPKG
@colormate/core
Version:
beta (0.5.0-beta)
latest (0.5.1-beta-1)
0.5.1-beta-1
0.5.1-beta
0.5.0-beta
A modular and efficient color management library for JavaScript and TypeScript applications.
@colormate/core
/
dist
/
helpers
/
MemoizationCache.js
15 lines
(14 loc)
•
261 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export
class
MemoizationCache
{
constructor
(
) {
this
.
cache
=
new
Map
(); }
get
(
key
) {
return
this
.
cache
.
get
(key); }
set
(
key, value
) {
this
.
cache
.
set
(key, value); }
clear
(
) {
this
.
cache
.
clear
(); } }