Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 29, 2024 via pnpm

is-ci 3.0.1

Detect if the current environment is a CI server
Package summary
Share
0
issues
1
license
2
MIT
Package created
7 Oct 2015
Version published
26 Oct 2021
Maintainers
2
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
ci-info@3.9.0
is-ci@3.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of is-ci 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
ci-info3.9.07.21 kBMIT
prod

Visualizations

Frequently Asked Questions

What does is-ci do?

The is-ci npm package is a JavaScript tool that helps in identifying if the current environment in which the code is running is a Continuous Integration (CI) server. It plays a crucial role in CI/CD pipelines, enabling developers to discern CI environments and carry out tasks accordingly. However, please note that if your CI server isn't detected properly, you can alert the package author by opening an issue.

How do you use is-ci?

Using is-ci in your codebase is incredibly straightforward. Firstly, you need to install the package in your project with the command npm install is-ci --save. Then you can include it in your file using the CommonJS require syntax as shown below:

const isCI = require('is-ci');

if (isCI) {
  console.log('The code is running on a CI server');
}

If the environment is indeed a CI server, then isCI will be true and the message will be logged to the console.

is-ci also supports CLI usage. You can use it globally by installing it with the -g flag (i.e., npm install is-ci -g) or as a dependency in your project. Once installed, you can use it as shown below:

is-ci && echo "This is a CI server"

In this scenario, if the environment is a CI server, the message "This is a CI server" will be outputted on your terminal.

Where are the is-ci docs?

The read-me document you've supplied is the main source of documentation for the is-ci package. For detailed information on the supported CI servers by is-ci, you can refer to the ci-info documentation. The is-ci project and its documentation are hosted on GitHub at https://github.com/watson/is-ci.