MediaSFU Angular
    Preparing search index...

    Class FormatNumber

    The FormatNumber service provides functionality to format numeric values into a more readable string representation, appending appropriate suffixes like K (thousands), M (millions), and B (billions).

    import { FormatNumber } from 'mediasfu-angular';

    constructor(private formatNumber: FormatNumber) {}

    async displayFormattedNumber() {
    const formatted = await this.formatNumber.formatNumber({ number: 1500 });
    console.log(formatted); // Outputs: "1.5K"
    }

    This service can be useful for displaying large numbers in a more compact form in user interfaces, especially in dashboards or reports where space is limited.

    The FormatNumber service for formatting numeric values.

    Index

    Constructors

    Methods

    Constructors

    Methods