Determine whether Node is running in development mode.
🤯 Mind blowing stuff 🤯
Everyone else has a silly one-liner in NPM with 8,000,000,000 downloads a week that eventually ends up getting compromised and a security exploit infects the entire internet - so I figured why not me too ¯\_(ツ)_/¯
NPM: npm install is-development-mode
Yarn: yarn add is-development-mode
import { isDevelopmentMode } from 'is-development-mode';
if (isDevelopmentMode()) {
console.log('We are in development mode 👍');
}