number-to-word-kz

1.0.8 • Public • Published

number-to-word-kz

npm version License

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

Package Sidebar

Install

npm i number-to-word-kz

Weekly Downloads

12

Version

1.0.8

License

ISC

Unpacked Size

4.54 kB

Total Files

3

Last publish

Collaborators

  • almubdi_mutaikhan