Repository URL to install this package:
|
Version:
0.6.0 ▾
|
export const SystemType = {
DEVELOPMENT: 'development',
PRODUCTION: 'production',
STAGING: 'staging',
PREPRODUCTION: 'preproduction',
};
const nodeEnvAndDoodleEnvToSystemTypeMap = {
'production-production': SystemType.PRODUCTION,
'production-staging': SystemType.STAGING,
'production-preproduction': SystemType.PREPRODUCTION,
};
const getSystemType = ({ NODE_ENV, DOODLE_ENV }) => {
const key = `${NODE_ENV}-${DOODLE_ENV}`;
const systemType = nodeEnvAndDoodleEnvToSystemTypeMap[key];
return systemType || SystemType.DEVELOPMENT;
};
export default getSystemType;