Skip to content

formatDutchNumber ​

Formats a number using Dutch locale rules and a fixed number of decimal places. Use decimals to align values in tables, cards, and chart labels.

Importing ​

ts
import { formatDutchNumber } from '@almighty-shogun/utils';

Usage ​

ts
import { formatDutchNumber } from '@almighty-shogun/utils';

const amount = formatDutchNumber(1234.567, 1);

Parameters

value: number
Value to format.

decimals?: number
Fraction digits.
Default: 2

Returns

A Dutch localized number string.

Uses ​

Type signature ​

ts
declare function formatDutchNumber(
    value: number,
    decimals?: number
): string;

All packages are released under the MIT License.