Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/kd_clients/core/Utils.ts>Utils

Various types of HTTP clients for misc uses. This is used in the organization's infrastructure.
Go to Latest
class Utils
import { Utils } from "https://deno.land/x/kd_clients@v0.0.5/core/Utils.ts";

Provides utility functions.

Static Properties

private
readonly
featureBranchRegex: RegExp
private
readonly
prevVersionRegex: RegExp
private
readonly
prodVersionRegex: RegExp

Static Methods

clamp(
value: number,
min: number,
max: number,
): number

Returns a number that is clamped between the given min and max values.

isIssue(issueOrPr: IssueModel | PullRequestModel): issueOrPr is IssueModel

Returns a value indicating whether or not the given issueOrPr is an issue.

isNullOrEmptyOrUndefined<T>(value:
| undefined
| null
| string
| number
| boolean
| T[]
| (() => T)
| object
): value is
| undefined
| null
| ""
| number
| T[]
| (() => T)

Checks if the value is null, undefined, or empty.

printAsGitHubError(message: string): void

Prints the given message as a GitHub error.

Prints an empty line to the console.