1.0.3 • Published 3 years ago

text-number v1.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
3 years ago

text-number

This tiny library contains classes which can be used to convert numbers into English/Farsi/Persian and Arabic languages. Other languages can be added easily by sub-classing TextNumber class.

Installation

npm i text-number

example

import { TextNumber, TextNumberFa, TextNumberAr } from 'text-number'

const englishTextNumber = new TextNumber();
const farsiTextNumber = new TextNumberFa();
const arabicTextNumber = new TextNumberAr();

const num = 324;

console.log(englishTextNumber.text(num));	// three hundred and twenty four
console.log(farsiTextNumber.text(num));		// سیصد و بیست و چهار
console.log(arabicTextNumber.text(num));	// ثلاث مئه و اربعه عشرون
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

4 years ago