npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

az-number-to-words

v0.1.1

Published

Convert numbers to Azerbaijani words, with manat/qəpik currency support

Readme

az-number-to-words

Convert numbers and AZN money amounts into Azerbaijani words.

Useful for invoices, contracts, bank documents and anywhere you need the written form of an amount — for example 1250.50 → min iki yüz əlli manat əlli qəpik.

  • No dependencies
  • ESM and CommonJS
  • TypeScript types included
  • Works with number, string and bigint

Install

npm install az-number-to-words

Usage

import { numberToWords, manatToWords } from "az-number-to-words";

numberToWords(1250); // "min iki yüz əlli"
numberToWords(1_000_000); // "bir milyon"
numberToWords(-7); // "mənfi yeddi"

manatToWords(1250.5); // "min iki yüz əlli manat əlli qəpik"
manatToWords(0.99); // "doxsan doqquz qəpik"

API

numberToWords(value, options?)

Converts a whole number into words. It throws if you pass a decimal value — use manatToWords for amounts with qəpik.

| Option | Type | Default | Description | | ------------ | --------- | ------- | ----------------------------------------------------------------------------- | | capitalize | boolean | false | Makes the first letter uppercase using Azerbaijani rules, so i becomes İ. |

numberToWords(20, { capitalize: true }); // "İyirmi"

manatToWords(value, options?)

Converts a money amount into words with the units manat and qəpik.

| Option | Type | Default | Description | | ----------------- | --------- | ------- | --------------------------------------------------------------------------------------------- | | capitalize | boolean | false | Same as above. | | alwaysShowMinor | boolean | false | Always prints both parts, even when they are zero. Official documents often need this format. |

manatToWords(1250, { alwaysShowMinor: true });
// "min iki yüz əlli manat sıfır qəpik"

Language rules

The library follows normal Azerbaijani usage:

  • 100 is yüz, not bir yüz
  • 1000 is min, not bir min
  • but 1000000 is bir milyon, because milyon and larger scales keep the bir

Empty groups are skipped, so 1_000_005 gives bir milyon beş.

Large numbers and precision

Floating point numbers lose precision above about 15 digits, and 0.1 + 0.2 problems are common with money. To stay safe, pass large or exact values as a string or a bigint:

numberToWords("1234567890123456"); // works
numberToWords(1234567890123456n); // works
manatToWords("1250.05"); // exact, no rounding surprise

The largest supported scale is kvadrilyon (1015).

Rounding

Amounts are rounded to two decimal places, based on the third digit. The manat part goes up when the qəpik part reaches 100:

manatToWords("10.994"); // "on manat doxsan doqquz qəpik"
manatToWords("10.995"); // "on bir manat"
manatToWords("0.999"); // "bir manat"

Errors

| Case | Error | | --------------------------------------------------------------- | ------------ | | NaN, Infinity, unsafe integer, exponential form like 1e21 | RangeError | | Decimal value passed to numberToWords | RangeError | | Number larger than kvadrilyon | RangeError | | Text that is not a number, such as "abc" | TypeError |

License

MIT