const toCurrency = (n: number, curr: string, LanguageFormat = undefined) =>
        Intl.NumberFormat(LanguageFormat, {
          style: 'currency',
          currency: curr,
        }).format(n);
      
      Typescript language logo

      Number to currency

      Codiga's TypeScript Recipes

      Takes a number and returns it in the specified currency formatting.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.