Module

x/humanity/mod.ts>createCustomHumanity

Humanizer for Deno & NodeJS
Latest
function createCustomHumanity
import { createCustomHumanity } from "https://dotland.deno.dev/x/humanity@1.5.0/mod.ts";

create Humanity instance with custom locale

const Humanity = createCustomHumanity({
    locale: "custom",
    numbers: {
        thousand: "tis",
        million: "er",
        billion: "pe",
        trillion: "xe",
        quadrillion: "fa",
        quintillion: "ier",
    },
});

console.log(Humanity.number(1000000)); // 1 000 000
// Output: 1 er

Parameters

locale: LocaleObject

Locale to be used

Returns

Humanity instance