# in-production

> Two simple variants of NODE_ENV === production

Latest version **1.0.1** (published 2015-10-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install in-production
pnpm add in-production
yarn add in-production
bun add in-production
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-10-22 |
| First published | 2015-09-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vincent Weevers |
| Maintainers | vweevers |
| Keywords | node_env, production |

## Links

- npm: https://www.npmjs.com/package/in-production
- Repository: https://github.com/vweevers/node-in-production
- Issues: https://github.com/vweevers/node-in-production/issues
- npm.io page: https://npm.io/package/in-production

## Dependencies (1)

- [envify](https://npm.io/package/envify.md) ~3.4.0

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-10-22
- 1.0.0 — 2015-09-29

## README

# in-production

**Two simple variants of NODE_ENV === production. Exports a boolean or a function, which turns into a noop when browserified. Best combined with [uglifyify](https://github.com/hughsk/uglifyify) as a transform to remove dead code.**

[![npm status](http://img.shields.io/npm/v/in-production.svg?style=flat-square)](https://www.npmjs.org/package/in-production) 

## example

As a boolean, using a cached `process.env.NODE_ENV`

```js
var inProduction = require('in-production')

if (inProduction) //..
```

As a function, using an uncached `process.env.NODE_ENV`

```js
var inProduction = require('in-production/function')

if (inProduction()) // ..
```

## install

With [npm](https://npmjs.org) do:

```
npm install in-production
```

## license

[MIT](http://opensource.org/licenses/MIT) © [Vincent Weevers](http://vincentweevers.nl/)

---
_Source: https://npm.io/package/in-production · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
