Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/cezaraugusto/is-browser-env

Checks whether or not the current runtime environment is a browser.
https://github.com/cezaraugusto/is-browser-env

is-browser is-browser-env is-node npm-module

Last synced: 13 days ago
JSON representation

Checks whether or not the current runtime environment is a browser.

Awesome Lists containing this project

README

        

[![Written in TypeScript](https://img.shields.io/badge/TypeScript-100%25-blue.svg)](https://github.com/cezaraugusto/is-browser-env) [![npm](https://img.shields.io/npm/v/is-browser-env.svg)]() [![Build Status](https://travis-ci.org/cezaraugusto/is-browser-env.svg?branch=master)](https://travis-ci.org/cezaraugusto/is-browser-env)

> TypeScript module with type definition support by default. Also works with other JavaScript projects.

# is-browser-env

Checks whether or not the current runtime environment is a browser.

## Useful when

You want to check if a given condition needs to have browser support.

## Installation

```sh
$ npm i is-browser-env
```

## Usage

```js
import isBrowserEnv from 'is-browser-env'

if (isBrowserEnv) {
// ...
}
```

## License

is-browser-env © 2018 [Cezar Augusto](https://twitter.com/cezaraugusto). Released under the MIT License.