3.1.8 • Published 3 years ago

number-to-azerbaijani-word v3.1.8

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

Number to Azerbaijani word GitHub license Travis build report Codecov report Bundle siz

Installation

The library has been designed to convert any integer or double to its Azerbaijani description. You can add it to your node project by writing:

npm install number-to-azerbaijani-word --save or yarn add number-to-azerbaijani-word

Usage

To use the library in your NodeJS project, import it in your file and call spellNumberInAz function.

const numberSpelling = require('number-to-azerbaijani-word');

const { spellNumberInAz } = numberSpelling;

console.log(spellNumberInAz(0)); // output: 'sıfır'

console.log(spellNumberInAz(-738)); // output: 'mənfi yeddi yüz otuz səkkiz'

console.log(spellNumberInAz(990999)); // output: 'doqquz yüz doxsan min doqquz yüz doxsan doqquz'

console.log(spellNumberInAz(-1234567));
// output: 'mənfi bir milyon iki yüz otuz dörd min beş yüz altmış yeddi'

console.log(spellNumberInAz(Number.MAX_SAFE_INTEGER));
// doqquz kvadrilyon yeddi trilyon yüz doxsan doqquz milyard iki yüz əlli dörd milyon yeddi yüz qırx min doqquz yüz doxsan bir

Usage with ES6 imports:

import React from 'react';
import { spellNumberInAz } from 'number-to-azerbaijani-word';

export default function App() {
  return (
    <div>
      <h1>{spellNumberInAz(123)}</h1>
    </div>
  );
}

If you want to use it in the browser then ES5 bundled version is available in NPM CDN. Simple, add following script to your HTML file and use it.

<script src="https://unpkg.com/number-to-azerbaijani-word@3.1.7/dist/number-to-az-word.umd.min.js"></script>
<script>
  console.log(spellNumberInAz(66)); // output: 'altmış altı'

  console.log(spellNumberInAz(-31)); // output: 'mənfi otuz bir'
</script>

Contribution

Please do not hesitate report issues, send pull requests about the code that you think is wrong or could be written better.

3.1.7

3 years ago

3.1.6

3 years ago

3.1.5

3 years ago

3.1.8

3 years ago

3.1.4

5 years ago

3.1.3

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.4

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

2.1.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago