@alloc/is-dev

Check for development and test environments.

Usage no npm install needed!

<script type="module">
  import allocIsDev from 'https://cdn.skypack.dev/@alloc/is-dev';
</script>

README

@alloc/is-dev

Check for development and test environments.

Compatible with browsers, Node, Vite, and React Native.

Dissolves when bundled.

import { isDev, isTest } from '@alloc/is-dev'

if (isDev) {
  // Do something during development only.
}

if (isTest) {
  // Do something during automated tests only.
}