mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
17 lines
257 B
JavaScript
17 lines
257 B
JavaScript
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
|
|
};
|