Socket
Socket
Sign inDemoInstall

is-npm

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 3.0.0

index.d.ts

7

index.js
'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;

14

package.json
{
"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);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc