index.d.ts
780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
Check if your code is running as an [npm](https://docs.npmjs.com/misc/scripts) or [yarn](https://yarnpkg.com/lang/en/docs/cli/run/) script.
@example
```
import {isNpmOrYarn} from 'is-npm';
if (isNpmOrYarn) {
console.log('Running as an npm or yarn script!');
}
```
*/
export const isNpmOrYarn: boolean;
/**
Check if your code is running as an [npm](https://docs.npmjs.com/misc/scripts) script.
@example
```
import {isNpm} from 'is-npm';
if (isNpm) {
console.log('Running as an npm script!');
}
```
*/
export const isNpm: boolean;
/**
Check if your code is running as a [yarn](https://yarnpkg.com/lang/en/docs/cli/run/) script.
@example
```
import {isYarn} from 'is-npm';
if (isYarn) {
console.log('Running as a yarn script!');
}
```
*/
export const isYarn: boolean;