std-env
Detect current Javascript environment
Last updated 3 years ago by pi0 .
MIT · Repository · Bugs · Original npm
$ cnpm install std-env 
SYNC missed versions from official npm registry.

std-env

npm npm bundlephobia

Detect current Javascript environment

Installation

# Using Yarn
yarn add std-env

# Using npm
npm i std-env

Usage

// ESM
import { isWindows } from 'std-env'

// CommonJS
const { isCI } = require('std-env')

Available exports:

  • hasTTY
  • hasWindow
  • isCI
  • isDebug
  • isDevelopment
  • isLinux
  • isMacOS
  • isMinimal
  • isProduction
  • isTest
  • isWindows
  • platform
  • provider

You can read more about how each flag works from ./src/index.ts.

List of well known providers can be found from ./src/providers.ts.

License

MIT

Current Tags

  • 3.3.3                                ...           latest (2 years ago)

7 Versions

  • 3.3.3                                ...           2 years ago
  • 3.3.0                                ...           3 years ago
  • 3.1.1                                ...           3 years ago
  • 2.3.1                                ...           4 years ago
  • 3.0.1                                ...           4 years ago
  • 1.3.1                                ...           7 years ago
  • 2.2.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (9)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org