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

x/pup/plugins/web-interface/static/js/helpers.js

Universal process manager built in Deno
Go to Latest
import * as pup from "https://deno.land/x/pup@1.0.0-rc.4/plugins/web-interface/static/js/helpers.js";

Functions

Converts ANSI color codes in text to corresponding HTML. Wraps colored sections of text in tags with appropriate styles. Replaces line breaks with for HTML display.

Converts the given bytes into a string with a unit. The units used are Bytes, KB, MB, GB and TB. The conversion is made to the smallest unit for which the value is greater than or equal to 1.

Converts the given seconds into a string with a time unit. The units used are years, days, hours, minutes, and seconds.

Determines a color identifier based on a process status.

Converts a process status code to a human-readable string.

Calculate the difference between a given date and the current date and format the difference as a string.