1.3.5 • Published 5 years ago

convert-to-words v1.3.5

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

convert-to-words

npm GitHub npm bundle size npm FOSSA Status

convert-to-words is a small javaScript TypeScript lib helps you to convert any number up to 10^300 and also covers decimal numbers and if its in the numbers you want to convert ar in dome txt you don't want to change it will do that for you be default

installation

npm

npm i convert-to-words

cdn

https://cdn.jsdelivr.net/npm/convert-to-words@1.3.5/index.js

options:

optiondescriptiondefault
langchanges the lang the supported languages is English:'en' Spanish:'es'en
numbersOnlywhen it set to true it makes the functions receive numbers onlyfalse

Usage:

// this will run on both browser and node
const convertToWords = convertToWords || require('convert-to-words');

convertToWords(999.999, {lang:'es'}); // => novecientos noveta y nueve comma novecientos noveta y nueve

also you can change the default of the function

// changing the default lang
convertToWords.options.lang = 'es';

// making the function receive numbers only (number could be also pass in as string)
// NOTE: it will throw an error if receives any thing except numbers
convertToWords.options.numberOnly = true;

convertToWords('999.99') // => novecientos noveta y nueve comma novecientos noveta y nueve

LICENCE

MIT License

Copyright (c) 2019 AliBasicCoder

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago