Skip to content

This is a JavaScript class that can be used to convert French numbers to words

Notifications You must be signed in to change notification settings

fjobeir/french-numbers-to-words

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

French numbers to words converter

This package converts numbers to their written forms in French language. Version 1.0.0 introduces breaking changes, please update carefully.

Installation

  npm install french-numbers-to-words

Usage

  import FrenchNumbersToWords from 'french-numbers-to-words';
  const numberToWords = new FrenchNumbersToWords('fr'); // 'fr' for French or 'be' for Belgian French
  numberToWords.convert(12345)
  // The result is an object like this
  {
    parts: [
      { number: 12, text: 'douze', unit: 'mille' },
      { number: 345, text: 'trois-cent-quarante-cinq', unit: '' }
    ],
    fullText: 'douze-mille-trois-cent-quarante-cinq'
  }

About

This is a JavaScript class that can be used to convert French numbers to words

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •