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 🙏

© 2024 – Pkg Stats / Ryan Hefner

kurdish-numbers-to-words

v1.0.6

Published

Convert numbers to Kurdish words

Downloads

42

Readme

Kurdish Numbers to Words

A NPM package converts the numbers to Kurdish (Kurmanji - Sorani) words. https://www.npmjs.com/package/kurdish-numbers-to-words Example:

187262 ==> `sed û heştê û heft hezar û dused û şêst û du` //Kurmanji
187262 ==> `سەد و هەشتا و حەوت هەزار و دووسەد و شەست و دوو` //Sorani

Installation:

  • With npm:
npm i kurdish-numbers-to-words
  • With yarn:
yarn add kurdish-numbers-to-words

Usage:

  1. Import the package:
import KurdishKurmanjiNumbersToWords from 'kurdish-numbers-to-words/Kurmanji.js'
import KurdishSoraniNumbersToWords from 'kurdish-numbers-to-words/Sorani.js'
  1. Use it:
let numberWords = KurdishKurmanjiNumbersToWords.convert(9876)
let numberWordsSorani = KurdishSoraniNumbersToWords.convert(9876)
console.log(numberWords)
console.log(numberWordsSorani)

Result:

neh hezar û heştsed û heftê û şeş
نۆ هەزار و هەشتسەد و حەفتا و شەش

Test:

You can test it using Mocha:

npm test

How does it work?

It depends on the following rules:

  • Digits from zero to nine are specific words, namely sifir [0], yek [1], du/didu [2], sê/sisê [3], çar [4], pênc [5], şeş [6], heft [7], heşt [8], and neh [9].
  • Numbers from eleven to nineteen are made by setting the unit digit root before the word for ten (deh), with no space: yanzdeh/yazde(h) [11], dwanzdeh [12], sêzdeh [13], çardeh [14], panzdeh/pazdeh [15], şanzdeh/şazdeh [16], hivdeh [17], hijdeh [18], and nozdeh [19].
  • The tens have specific names based on the multipliers digits roots, except for ten and twenty: deh [10], bîst [20], sî [30], çil [40], pêncî [50], şêst [60], heftê [70], heştê [80], and nod [90].
  • The hundreds are built by telling the multiplier digit, then the word for hundred (sed), with no space (e.g.: pêncsed [500], şeşsed [600]).
  • The thousands are built by telling the multiplier digit, then the word for thousand (hezar), with an exception for five thousand (e.g.: çar hezar [4,000], pênj hezar [5,000], şeş hezar [6,000]).
  • Compound numbers are built by spelling out the ten, then the digit, united with the word û (e.g.: sî û du [32], heftê û yek [71]). The rule is the same between hundred and ten or unit, and between thousand and hundred (e.g.: sed û yek [101], hezar û dused [1,200]).
  • There are also specific words for one hundred thousand (lek [100,000]), and five hundred thousands (kirûr [500,000]).
  • One million is milyon.
  • From one milyon to less than one billion works the same way as thousands (the 5's rule included)
  • One billion is milyar
  • More than 1 billion will be spelled a number by number
  • The same rules applies for the Sorani version Most of these rules are from: Of Languages and Numbers