wherearewe
> environment detection
Last updated 4 years ago by achingbrain .
ISC · Original npm · Tarball · package.json
$ npm install wherearewe 
SYNC missed versions from official npm registry.

wherearewe

codecov CI

Detect the current environment

Table of contents

Install

$ npm i wherearewe

Usage

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

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.

Current Tags

  • 2.0.1                                ...           latest (2 years ago)

8 Versions

  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE