Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 741 Bytes

README.md

File metadata and controls

34 lines (20 loc) · 741 Bytes

ToPersianNumber Library

ToPersianNumber is a simple, lightweight function designed to convert English numbers to Persian numbers. It's perfect for use in Next.js and React.js projects where localization for Persian (Farsi) language is required.

Installation

Install the library using npm:

npm install topersiannumber

or using Yarn:

yarn add topersiannumber

Usage

Import the topersiannumber function into your project and use it to convert numbers or strings containing numbers into Persian format.

Example

import { ToPersianNumber } from 'topersiannumber';

const persianFormattedNumber = ToPersianNumber(123456);

console.log(persianFormattedNumber);

// Outputs: ١٢٣٤٥٦