Skip to content
/ std-env Public
forked from unjs/std-env

Detect current Javascript environment

License

Notifications You must be signed in to change notification settings

cleavr/std-env

 
 

Repository files navigation

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

About

Detect current Javascript environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%