Comparing version 3.0.0-alpha to 3.0.0
{ | ||
"name": "std-env", | ||
"version": "3.0.0-alpha", | ||
"description": "Detect running environment of the current Node.js process", | ||
"version": "3.0.0", | ||
"description": "Detect current Javascript environment", | ||
"repository": "unjs/std-env", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"repository": "nuxt-contrib/std-env", | ||
"contributors": [ | ||
"Pooya Parsa <pooya@pi0.ir>" | ||
"sideEffects": false, | ||
"exports": { | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
}, | ||
"main": "./dist/index.cjs", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"dependencies": { | ||
"ci-info": "^2.0.0" | ||
"scripts": { | ||
"prepack": "unbuild", | ||
"release": "yarn test && standard-version && git push --follow-tags && npm publish", | ||
"test": "node test.cjs" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
] | ||
"devDependencies": { | ||
"standard-version": "^9.3.2", | ||
"unbuild": "^0.5.11" | ||
} | ||
} |
# std-env | ||
[![npm](https://img.shields.io/npm/dt/std-env.svg?style=flat-square)](http://npmjs.com/package/std-env) | ||
[![npm](https://img.shields.io/npm/dm/std-env.svg?style=flat-square)](http://npmjs.com/package/std-env) | ||
[![npm](https://img.shields.io/npm/v/std-env.svg?style=flat-square)](http://npmjs.com/package/std-env) | ||
[![bundlephobia](https://img.shields.io/bundlephobia/min/std-env/latest.svg?style=flat-square)](https://bundlephobia.com/result?p=std-env) | ||
Detect running environment of the current Node.js process. | ||
> Detect current Javascript environment | ||
## Installation | ||
Using yarn: | ||
``` | ||
```sh | ||
# Using Yarn | ||
yarn add std-env | ||
``` | ||
Usin npm: | ||
``` | ||
# Using npm | ||
npm i std-env | ||
@@ -25,25 +22,32 @@ ``` | ||
```js | ||
const env = require('std-env') | ||
// ESM | ||
import { isWindows } from 'std-env' | ||
console.log(env) | ||
/* | ||
{ | ||
browser: false, | ||
test: false, | ||
dev: true, | ||
production: false, | ||
debug: false, | ||
ci: false, | ||
tty: true, | ||
minimalCLI: false, | ||
windows: false, | ||
darwin: true, | ||
linux: false | ||
} | ||
*/ | ||
// 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](./src/index.ts). | ||
List of well known providers can be found from [./src/providers.ts](./src/providers.ts). | ||
## License | ||
MIT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10058
0
6
211
0
1
53
1
2
2
1
- Removedci-info@^2.0.0
- Removedci-info@2.0.0(transitive)