North Pittsburgh Meatpackers
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

digitstowords

1.0.2 • Public • Published

DigitToWord

Multilingual digits to words convertor

Installation

npm install --save digitstowords

Usage

const DigitToWord = require('digitstowords');
 
// Default locale is farsi(persian)
console.log(DigitToWord.fromDigits(12234343454)); // Or 
let dtw = new DigitToWord(12234343454);
console.log(dtw.toWords());
 // دوازده میلیارد و دویست و سی و دو میلیون و سیصد و چهل و سه هزار و چهارصد و پنجاه و چهار
 
 
// load azeri locale
const locale_az = require('digitstowords/locales/az');
console.log(DigitToWord.fromDigits(23434000, locale_az)); // Or 
dtw = new DigitToWord(23434000);
console.log(dtw.toWords());
 
// iyirmi üç milyon, dörd-yüz otuz dörd min
 

Available languages

  • Fa (persian)
  • English
  • Azeri (Azerbaijan)
  • ... add more

Install

npm i digitstowords

DownloadsWeekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

9.42 kB

Total Files

9

Last publish

Collaborators

  • avatar