markdownlint/lib/cache.js

18 lines
384 B
JavaScript
Raw Normal View History

// @ts-check
"use strict";
2022-06-02 21:33:31 -07:00
const map = new Map();
2022-06-02 21:33:31 -07:00
module.exports.set = (keyValuePairs) => {
for (const [ key, value ] of Object.entries(keyValuePairs)) {
map.set(key, value);
}
};
2022-06-02 21:33:31 -07:00
module.exports.clear = () => map.clear();
2022-06-02 21:33:31 -07:00
module.exports.flattenedLists =
() => map.get("flattenedLists");
module.exports.referenceLinkImageData =
() => map.get("referenceLinkImageData");