Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

humanise

Package Version Hex Docs

gleam add humanise
import gleam/io

import humanise
import humanise/time

pub fn main() {
  humanise.bytes_int(10_000) |> io.println // 10KB

  time.Seconds(0.5) |> time.humanise |> time.to_string |> io.println // 500ms

  time.Hours(1.0) |> time.to_minutes |> echo // 60.0

  time.Months(1.075) |> time.split(time.to_string_full) |> io.println // 1 month, 2.3 days
}

Further documentation can be found at https://hexdocs.pm/humanise.

Development

gleam run   # Run the project
gleam test  # Run the tests

About

Easily format values for human readability!

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages