nebula/environment.js
2020-08-01 00:41:54 +08:00

16 lines
520 B
JavaScript

/**
* @file Environment / ES module
* @module environment
* @author Ronger <https://github.com/ronger-x>
*/
export const environment = process.env
export const NODE_ENV = environment.NODE_ENV
export const isDevMode = Object.is(NODE_ENV, 'development')
export const isProdMode = Object.is(NODE_ENV, 'production')
export const isStatic = process && process.static
export const isServer = process && process.server
export const isBrowser = process && process.browser
export const isModern = process && process.modern