@iamxiyang/env-checker
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-beta.1 • Public • Published

env-checker

检查当前程序的运行环境。

安装

# pnpm
pnpm add @iamxiyang/env-checker
# yarn
yarn add @iamxiyang/env-checker
# npm
npm install @iamxiyang/env-checker

使用

import { isNpm, isPnpm, isYarn, isBun, isPnpmCli, isYarnCli, isNpmCli, isCli, getPackageManager, isWin, isMac, isLinux, isStackblitz, isJenkins, isCodeship, isCI, isDroneIO, isCircleCI, isTravisCI, isTencentSCF, isVercel, isNetlify, isHeroku, isJest, isVitest, isTest } from '@iamxiyang/env-checker'

isNpm() // true if npm
isPnpm() // true if pnpm
isYarn() // true if yarn

getPackageManager() // 'npm' | 'pnpm' | 'yarn' | 'bun'

isTest() // true if test

说明

部分代码借助 AI 生成,未经详细测试,如有问题请提交反馈。

Package Sidebar

Install

npm i @iamxiyang/env-checker

Weekly Downloads

1

Version

0.1.0-beta.1

License

MIT

Unpacked Size

9.6 kB

Total Files

5

Last publish

Collaborators

  • iamxiyang