Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/durationjs/src/duration.ts>addZero

Get the formated time duration
Go to Latest
function addZero
import { addZero } from "https://deno.land/x/durationjs@v4.1.0/src/duration.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