ienv
v2.0.0
Published
Is Env - Environment Detecter
Downloads
1,371
Maintainers
Readme
Installation
$ yarn add ienv
Usage
import env, { isNode, isDev } from 'ienv'
Exports CONSTANTS
env: string
Get process.NODE_ENV
default is development
isDev: boolean
process.NODE_ENV === 'development'
isProd: boolean
process.NODE_ENV === 'production'
isBrowser: boolean
Check if in browser
isNode: boolean
Check if in Node
Global
Returns window
in browser, global
in Node.