environment.js 672 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. function getEnv() {
  4. if (typeof process !== 'undefined' && process.env.NODE_ENV) {
  5. return process.env.NODE_ENV;
  6. }
  7. return 'development';
  8. }
  9. exports.getEnv = getEnv;
  10. function isEnv(env) {
  11. return getEnv() === env;
  12. }
  13. exports.isEnv = isEnv;
  14. function isProduction() {
  15. return isEnv('production') === true;
  16. }
  17. exports.isProduction = isProduction;
  18. function isDevelopment() {
  19. return isEnv('development') === true;
  20. }
  21. exports.isDevelopment = isDevelopment;
  22. function isTest() {
  23. return isEnv('test') === true;
  24. }
  25. exports.isTest = isTest;
  26. //# sourceMappingURL=environment.js.map