MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / destroy

Function destroy

src/common/cache.js:73–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71 }
72 }
73 function destroy() {
74 // delete all keys to make sure onDispose is called for each value
75 if (onDispose) {
76 // cache inherits null so we don't need to check hasOwnProperty
77 // eslint-disable-next-line guard-for-in
78 for (const key in cache) {
79 del(key);
80 }
81 } else {
82 cache = Object.create(null);
83 }
84 clearTimeout(timer);
85 timer = 0;
86 }
87 function reschedule(entry, lifetime = defaultLifetime) {
88 entry.expiry = lifetime + getNow();
89 if (timer) {

Callers

nothing calls this directly

Calls 1

delFunction · 0.85

Tested by

no test coverage detected