Files
30-seconds-of-code/snippets/isTravisCI.md
2018-01-01 16:45:34 +00:00

427 B

isTravisCI

Checks if the current environment is Travis CI.

Checks 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)