Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@npmcli/ci-detect

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@npmcli/ci-detect

Detect what kind of CI environment the program is in

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
544K
increased by5.02%
Maintainers
5
Weekly downloads
 
Created

What is @npmcli/ci-detect?

@npmcli/ci-detect is a utility package that helps detect if your code is running in a Continuous Integration (CI) environment. It can identify various CI services and provide information about the environment.

What are @npmcli/ci-detect's main functionalities?

Detect CI Environment

This feature allows you to detect if your code is running in a CI environment and returns the name of the CI service if detected. The code sample demonstrates how to use the package to get the CI service name.

const ciDetect = require('@npmcli/ci-detect');
const ciName = ciDetect();
console.log(`Running in CI: ${ciName}`);

Check Specific CI Service

This feature allows you to check if your code is running on a specific CI service. The code sample shows how to check if the environment is Travis CI.

const ciDetect = require('@npmcli/ci-detect');
const isTravis = ciDetect() === 'travis';
console.log(`Is Travis CI: ${isTravis}`);

Other packages similar to @npmcli/ci-detect

FAQs

Package last updated on 10 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc