is-npm
Advanced tools
Comparing version 2.0.0 to 3.0.0
'use strict'; | ||
module.exports = 'npm_config_username' in process.env || | ||
const isNpm = | ||
'npm_config_username' in process.env || | ||
'npm_package_name' in process.env || | ||
'npm_config_heading' in process.env; | ||
// TODO: This named export should be replaced by a default export as soon as we move to ES modules | ||
exports.isNpm = isNpm; |
{ | ||
"name": "is-npm", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Check if your code is running as an npm script", | ||
@@ -13,9 +13,10 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=6" | ||
"node": ">=8" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
"test": "xo && ava && tsd-check" | ||
}, | ||
"files": [ | ||
"index.js" | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
@@ -33,5 +34,6 @@ "keywords": [ | ||
"devDependencies": { | ||
"ava": "*", | ||
"xo": "*" | ||
"ava": "^1.3.1", | ||
"tsd-check": "^0.3.0", | ||
"xo": "^0.24.0" | ||
} | ||
} |
@@ -16,3 +16,3 @@ # is-npm [![Build Status](https://travis-ci.org/sindresorhus/is-npm.svg?branch=master)](https://travis-ci.org/sindresorhus/is-npm) | ||
```js | ||
const isNpm = require('is-npm'); | ||
const {isNpm} = require('is-npm'); | ||
@@ -19,0 +19,0 @@ console.log(isNpm); |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2816
5
19
0
3