An open API service indexing awesome lists of open source software.

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

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.
}
```