Check which environment you are in. Inspired by ment.
Menta defines the value of the current environment by:
- Reads
ENVIRONMENT
environment variable. - If not found, reads
NODE_ENV
environment variable. - If not found, uses
"development"
by default.
var Menta = require("menta");
Menta.getEnvironment()
// => "development"
Menta.isDevelopment() // => true
Menta.isTest() // => false
Menta.isStaging() // => false
Menta.isProduction() // => false
$ npm install menta --save