gleamy_lights/console

Functions

pub fn error(str: String) -> Nil

console.error()

A simple function to print a error to the console. This function is a drop-in for the println function, so that JS colour support is ensured, even on browsers.

Mainly meant for packages that are ran everywhere, like Gleam libraries.

If you stay in the console just use the gleam/io module. There’s no need to use this function then.

Note: Nested colours are not yet supported.

pub fn info(str: String) -> Nil

console.info()

A simple function to print a message to the console. This function is a drop-in for the println function, so that JS colour support is ensured, even on browsers.

Mainly meant for packages that are ran everywhere, like Gleam libraries.

If you stay in the console just use the gleam/io module. There’s no need to use this function then.

Note: Nested colours are not yet supported.

pub fn log(str: String) -> Nil

console.log()

A simple function to print a string to the console. This function is a drop-in for the println function, so that JS colour support is ensured, even on browsers.

Mainly meant for packages that are ran everywhere, like Gleam libraries.

If you stay in the console just use the gleam/io module. There’s no need to use this function then.

Note: Nested colours are not yet supported.

pub fn warn(str: String) -> Nil

console.warn()

A simple function to print a warning to the console. This function is a drop-in for the println function, so that JS colour support is ensured, even on browsers.

Mainly meant for packages that are ran everywhere, like Gleam libraries.

If you stay in the console just use the gleam/io module. There’s no need to use this function then.

Note: Nested colours are not yet supported.

Search Document