Files
30-seconds-of-code/snippets/isTravisCI.md
Isabelle Viktoria Maciohsek caa67e2a49 Update snippet descriptions
2020-10-20 23:02:01 +03:00

461 B

title, tags
title tags
isTravisCI node,intermediate

Checks if the current environment is Travis CI.

  • Check if the current environment has the TRAVIS and CI environment variables (reference).
const isTravisCI = () => 'TRAVIS' in process.env && 'CI' in process.env;
isTravisCI(); // true (if code is running on Travis CI)