stack

Home > @infiniteobjects/core-library-node > Humanize

Humanize class

Utilities to transform units to human readable strings.

Signature:

export declare class Humanize 

Methods

Method Modifiers Description
address(address) static Convert wallet address to human readable string: 0x1234c09B6C0342BC211c144A783E7b526d12ABCD → 0x1234...ABCD
bytes(bytes) static Convert bytes to a human readable string: 1337 → 1.34 kB
date(date) static Return the distance between the given date and now in words.
milliseconds(milliseconds, verbose) static Convert milliseconds to a human readable string: 1337000000 → 15d 11h 23m 20s