0.2.0 • Published 4 years ago

spell-out v0.2.0

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

SpellOut

This will help convert number to its alphabetical equivalent form.

Example:

const { SpellOut } = require("spell-out");

SpellOut(12345678); // -- One Crore Twenty Three Lakh Fourty Five Thousand Six Hundred Seventy Eight

SpellOut("12345678"); // -- One Crore Twenty Three Lakh Fourty Five Thousand Six Hundred Seventy Eight

Example with format parameter:

  • By default format is set to I, which stands for INDIAN FORMAT
  • So we don't have to pass it if we want output in indian format.
  • Other option for format is U, which stands for INTERNATIONAL FORMAT
  • Below code depicts the same example as above but with "U" format.
SpellOut("12345678", "U"); // --- Twelve Million Three Hundred and Forty Five Thousand Six Hundred and Seventy Eight

TODOs:

  • USD output format (This is completed planned in next released)
  • Support for comma seperated numbers, like 12,345,678 or 1,23,45,678
  • Support for larger number till Number.MAX_SAFE_INTEGER

Bugs

App

Author: Mujibur Rehman

0.2.0

4 years ago

0.1.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago