code: function getEnvironment (options) {
    var env;
  
    if (options.environment) {
      env = options.environment;
    } else {
      env = process.env.NODE_ENV;
    }
  
    if (env) {
      if (env === 'prod') {
        env = 'production';
      } else if (env === 'dev') {
        env = 'development';
      }
    } else {
          // Default to "development"
      env = 'development';
    }
  
    return env;
  }
docs: Determine the environment from the provided options and the
  NODE_ENV environment variable. Also normalize the environment
  name such that "prod" becomes "production" and "dev" becomes
  "development".