Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/localekit/util/format.ts>format

A translation plugin for Deno
Go to Latest
function format
import { format } from "https://deno.land/x/localekit@0.9.0/util/format.ts";

Formats a string by replacing dynamic placeholders with corresponding values from the provided data object.

Type Parameters

T extends Record<string, unknown>
  • The type of the data object.

Parameters

optional
str = [UNSUPPORTED]
  • The string to be formatted.
optional
data: T
  • The data object containing values for dynamic placeholders.
optional
functions: Record<string, FunctionType<T>>
  • An optional object containing custom functions for dynamic comparisons.

Returns

string

The formatted string.