Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/aleclarson/is-node-env

Know when your code is running in a NodeJS environment.
https://github.com/aleclarson/is-node-env

Last synced: 19 days ago
JSON representation

Know when your code is running in a NodeJS environment.

Awesome Lists containing this project

README

        

# is-node-env v1.0.0 [![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)

This module simply exports a `Boolean` indicating if your code is in a NodeJS environment.

```JavaScript
isNodeEnv = require('is-node-env');

if (isNodeEnv) {
// Do node-y things, like detonating the filesystem!
} else {
// We must be in a browser... meh
}
```

 

### install

```sh
npm install aleclarson/is-node-env#1.0.0
```