Skip to main content
Module

x/durationjs/mod.ts>addZero

Get the formated time duration
Go to Latest
function addZero
import { addZero } from "https://deno.land/x/durationjs@v4.1.0/mod.ts";

Add zeros to the beginning of a number till it reaches a certain digit count.

Parameters

num: number

Number to add zeros to.

optional
digits = [UNSUPPORTED]

Number of digits the number has to reach.

Returns

string