Skip to main content

deno-is

tag Build Status license

Detect the running environment and context of the current script.

Usage

import { isRunning, isRunningSync, isCI, isCISync } from "https://deno.land/x/is/mod.ts";

isCISync();
// => false
isRunningSync(Deno.pid);
// => true

await isCI();
// => false
await isRunning(Deno.pid);
// => true

or

import { isCI, isCISync } from "https://deno.land/x/is/ci.ts";

isCISync();
// => false

await isCI();
// => false

Available methods

alphabetical order:

Methods Description
isCI/isCISync Whether the process is running on the CI server
isDocker/isDockerSync Whether the process is running inside Docker
isGzip/isGzipSync Whether a Uint8Array is a gzip file
isRunning/isRunningSync Whether the process(pid) is running
isSSH/isSSHSync Whether the process is running inside SSH
isWsl/isWslSync Whether the process is running inside Windows Subsystem for Linux

Credits

License

deno-is is released under the MIT License. See the bundled LICENSE file for details.