libs/config/store.js (view raw)
1const { getConfig, storeConfig } = require("./_utils");
2
3const store = (type, name, content) => {
4 let config = getConfig();
5
6 if (config[type]) {
7 config[type] = { ...config[type], [name]: content };
8 } else config = { ...config, [type]: { [name]: content } };
9
10 storeConfig(config);
11};
12
13module.exports = store;