# wherearewe

> Detect the current environment

Latest version **2.0.1** (published 2022-08-13) · Apache-2.0 OR MIT license · 0 weekly downloads

## Install

```sh
npm install wherearewe
pnpm add wherearewe
yarn add wherearewe
bun add wherearewe
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2022-08-13 |
| First published | 2020-08-28 |
| Weekly downloads | 0 |
| License | Apache-2.0 OR MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=16.0.0 |
| Dependencies | 1 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | achingbrain |

## Links

- npm: https://www.npmjs.com/package/wherearewe
- Repository: https://github.com/achingbrain/wherearewe
- Homepage: https://github.com/achingbrain/wherearewe#readme
- Issues: https://github.com/achingbrain/wherearewe/issues
- npm.io page: https://npm.io/package/wherearewe

## Dependencies (1)

- [is-electron](https://npm.io/package/is-electron.md) ^2.2.0

## Recent versions

- 2.0.1 (latest) — 2022-08-13
- 2.0.0 — 2022-08-13
- 1.0.2 — 2022-03-21
- 1.0.1 — 2022-03-01
- 1.0.0 — 2021-03-04
- 0.0.3 — 2021-03-04
- 0.0.2 — 2021-03-04
- 0.0.1 — 2020-08-28

## README

# wherearewe <!-- omit in toc -->

[![codecov](https://img.shields.io/codecov/c/github/achingbrain/wherearewe.svg?style=flat-square)](https://codecov.io/gh/achingbrain/wherearewe)
[![CI](https://img.shields.io/github/workflow/status/achingbrain/wherearewe/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/achingbrain/wherearewe/actions/workflows/js-test-and-release.yml)

> Detect the current environment

## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Usage](#usage)
- [License](#license)
- [Contribution](#contribution)

## Install

```console
$ npm i wherearewe
```

## Usage

```javascript
import * as where from 'wherearewe'

console.info(where)
// {
//  isTest: boolean,
//  isElectron: boolean,
//  isElectronMain: boolean,
//  isElectronRenderer: boolean,
//  isNode: boolean,
//  isBrowser: boolean, // Detects browser main thread  **NOT** web worker or service worker
//  isWebWorker: boolean,
//  isEnvWithDom: boolean
//}
```

## License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

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