init source
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
'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);
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user