UNPKG
@leobastiani/memoizee
Version:
latest (1.0.2)
1.0.2
1.0.1
memoizee with reset function
github.com/leobastiani/memoizee
leobastiani/memoizee
@leobastiani/memoizee
/
reset.js
12 lines
(10 loc)
•
257 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
export
const
resets = process.
env
.
NODE_ENV
===
"production"
?
undefined
:
new
Set
();
export
function
resetAll
(
) {
if
(process.
env
.
NODE_ENV
!==
"production"
) {
for
(
const
memoized
of
resets) { memoized.
clear
(); } resets.
clear
(); } }