number-to-word-kz
v1.0.8
Published
Converts number to text-based form in Kazakh language
Downloads
13
Maintainers
Readme
number-to-word-kz
A lightweight npm package for converting numbers to text in Kazakh language.
Installation
You can install this package using npm:
npm install number-to-word-kz
Usage
Server side
const numberToWordKz = require("number-to-word-kz");
const textNumber = numberToWordKz(12345);
const textNumberMillion = numberToWordKz("100 000 000 000");
console.log(textNumber);
// Output: он екі мың үш жүз қырық бес
console.log(textNumberMillion);
// Output: бір жүз миллиард
Browser Side
import './App.css'
import numberToTextKZ from 'number-to-word-kz'
function App() {
return (
<>
<h1>{numberToTextKZ("58798")}</h1>
</>
)
}
export default App
Features
- Can accept both string and number
- Can accept negative numbers
Error handling
The function returns undefined and outputs the error in case of violation of validation.
Limits
- Max absolute integer value is 100 000 000 000