#945 Some cleanup

This commit is contained in:
Knut Sveidqvist
2019-10-05 09:02:20 +02:00
parent 65cbfbdb40
commit d4306e61c2
6 changed files with 323 additions and 427 deletions

View File

@@ -0,0 +1,16 @@
const idCache = {};
export const set = (key, val) => {
idCache[key] = val;
};
export const get = k => idCache[k];
export const keys = () => Object.keys(idCache);
export const size = () => keys().length;
export default {
get,
set,
keys,
size
};