https://github.com/alloc/is-dev
Returns true when in a development environment
https://github.com/alloc/is-dev
Last synced: 11 months ago
JSON representation
Returns true when in a development environment
- Host: GitHub
- URL: https://github.com/alloc/is-dev
- Owner: alloc
- Created: 2016-03-14T01:49:48.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-10-18T03:30:34.000Z (over 4 years ago)
- Last Synced: 2025-02-13T08:52:46.668Z (12 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @alloc/is-dev
Check for development and test environments.
Compatible with browsers, Node, Vite, and React Native.
Dissolves when bundled.
```ts
import { isDev, isTest } from '@alloc/is-dev'
if (isDev) {
// Do something during development only.
}
if (isTest) {
// Do something during automated tests only.
}
```