🖋️Plugins

Util

Kind: global class

new Util()

Canvacard Util

Util.validateHex(hex) ⇒ boolean

Validates hex

Kind: static method of Util

Util.discordTime(time) ⇒ string

Converts regular timestamp to discord like time

Kind: static method of Util

Util.formatTime(time) ⇒ string

Formats time

Kind: static method of Util

Util.shorten(text, len) ⇒ string

Shorten text.

Kind: static method of Util

Util.toAbbrev(num) ⇒ string | string

Converts numbers into units like 1K, 1M, 1B etc.

Kind: static method of Util

Util.renderEmoji(ctx, msg, x, y) ⇒ Promise.<void>

Renders text with emoji

Kind: static method of Util

Util.formatHex(hex, alt) ⇒ string

Returns formatted hex code

Kind: static method of Util

Util.invertColor(hex) ⇒ string

Inverts hex color

Kind: static method of Util

Util.getAcronym(name) ⇒ string

Returns acronym

Kind: static method of Util

Util.getLines(params, text, ctx, maxWidth) ⇒ Array.<string>

Returns array of lines

Kind: static method of Util

Last updated