Skip to content
0

katanakit-js / useToPounds

Function: useToPounds() ​

ts
function useToPounds(
   kilos, 
   locale?, 
   digits?
): string;

Defined in: src/core/services/formatter.service.ts:338

Pure: kilograms → pounds (formatted).

Parameters ​

ParameterTypeDefault valueDescription
kilosnumberundefinedWeight in kilograms.
locale"en" | "es" | "fr" | "de" | "it" | "pt" | "ja" | "zh""en"BCP 47 locale tag. Defaults to "en".
digitsnumber2Fraction digits. Defaults to 2.

Returns ​

string

The formatted pound string.

Example ​

ts
import { useToPounds } from "katanakit-js";

useToPounds(1); // "2.20"

Released under the MIT License.