四好公路
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
430 B

3 years ago
'use strict';
const stores = new Map();
module.exports = dialect => {
if (!stores.has(dialect)) {
stores.set(dialect, new Map());
}
return {
clear() {
stores.get(dialect).clear();
},
refresh(dataType) {
for (const type of dataType.types[dialect]) {
stores.get(dialect).set(type, dataType.parse);
}
},
get(type) {
return stores.get(dialect).get(type);
}
};
};