crootfast
Version:
大前端工程化命令行脚手架
29 lines (22 loc) • 354 B
JavaScript
const state = {
"env": "prod"
};
function setState(key, value) {
state[`$${key}`] = value;
}
function getState() {
return state[`$${key}`];
}
function setGlobal(key, value) {
global[`$${key}`] = value;
}
function getGlobal(key) {
return global[`$${key}`];
}
module.exports = {
state,
setGlobal,
getGlobal,
getState,
setState
};