UNPKG

@aotearoan/neon

Version:

Neon is a lightweight design library of Vue 3 components with minimal dependencies.

30 lines (29 loc) 951 B
import type { NeonNumberFormatOptions } from '../models/NeonNumberFormatOptions'; /** * Utilities for helping with number formatting. */ export declare class NeonNumberUtils { private static parseExample; private static decimalSeparator; private static cleanPattern; private static valuePlaceholder; private static percentageFormat; /** * Format a number for a provided locale. * * @param value Number to format. * @param options formatting options. * @param locale The user's locale. * * @returns The formatted number as a string. */ static formatNumber(value: number, options?: NeonNumberFormatOptions, locale?: string | null): string; /** * Parse a number string, removing formatting & returning the numeric value. * * @param value The number string to parse. * * @returns The parsed number. */ static parseNumber(value: string): number; }