envizor
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

cover npm version npm downloads bundle JSDocs License

🕵️‍♂️ Detect JS environment easily.

Install:

# nyxi
nyxi envizor

#pnpm
pnpm add envizor

# Using npm
npm i envizor

# Using Yarn
yarn add envizor

Usage

// ESM
import { isWindows } from 'envizor'

// CommonJS
const { isCI } = require('envizor')

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 - Made with 💞

Readme

Keywords

none

Package Sidebar

Install

npm i envizor

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

14.8 kB

Total Files

7

Last publish

Collaborators

  • dennisollhoff