mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Remove state from shared.js, move to cache.js.
This commit is contained in:
parent
827e1acb56
commit
f614f3e1ce
17 changed files with 124 additions and 98 deletions
24
lib/cache.js
Normal file
24
lib/cache.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// @ts-check
|
||||
|
||||
"use strict";
|
||||
|
||||
let lineMetadata = null;
|
||||
module.exports.lineMetadata = (value) => {
|
||||
if (value) {
|
||||
lineMetadata = value;
|
||||
}
|
||||
return lineMetadata;
|
||||
};
|
||||
|
||||
let flattenedLists = null;
|
||||
module.exports.flattenedLists = (value) => {
|
||||
if (value) {
|
||||
flattenedLists = value;
|
||||
}
|
||||
return flattenedLists;
|
||||
};
|
||||
|
||||
module.exports.clear = () => {
|
||||
lineMetadata = null;
|
||||
flattenedLists = null;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue