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 🙏

© 2025 – Pkg Stats / Ryan Hefner

number-to-nepali-words

v1.0.0

Published

Convert numbers between English and Nepali numerals, words, and currency formats. Supports Nepali language representation of numbers. Includes currency formatting (if applicable).

Readme

Nepali Number Converter

A lightweight, versatile toolkit to convert numbers between English and Nepali formats. Whether you need to transform numerals into Nepali digits, spell out numbers as words, or format currency amounts, number-to-nepali-words has you covered. This package is ideal for projects requiring Nepali localization, internationalization (i18n), and currency conversion.

🚀 Quick Start

Install the package in your project:

npm install number-to-nepali-words

📖 How to Use

Basic Usage

Import the converter and use it to convert numbers between English and Nepali formats:

import convert from "number-to-nepali-words";

// Convert English to Nepali numbers:
convert("123", "toNp"); // Returns: १२३

// Convert Nepali to English numbers:
convert("१२३", "toEn"); // Returns: 123

// Convert numbers to Nepali words:
convert("1234", "toNpWord"); // Returns: एक हजार दुई सय चौतीस

// Convert numbers to English words:
convert("1234", "toEnWord"); // Returns: one thousand two hundred and thirty-four

Currency Format Conversion

To format currency values, pass "currency" as the third parameter:

// Convert to Nepali currency format:
convert("1234.50", "toNpWord", "currency");
// Returns: एक हजार दुई सय चौतीस रुपैया पचास पैसा मात्र

// Convert to English currency format:
convert("1234.50", "toEnWord", "currency");
// Returns: one thousand two hundred and thirty-four dollars and fifty cents

🔧 Available Methods

  • toNp: Converts English numbers to Nepali digits (e.g., 123 → १२३)
  • toEn: Converts Nepali numbers to English digits (e.g., १२३ → 123)
  • toNpWord: Converts numbers to Nepali words (e.g., 1234 → एक हजार दुई सय चौतीस)
  • toEnWord: Converts numbers to English words (e.g., 1234 → one thousand two hundred and thirty-four)

💡 Examples

// Basic number conversion:
convert("123", "toNp"); // १२३
convert("१२३", "toEn"); // 123

// Word conversion:
convert("1234", "toNpWord"); // एक हजार दुई सय चौतीस
convert("1234", "toEnWord"); // one thousand two hundred and thirty-four

// Currency conversion:
convert("1234.50", "toNpWord", "currency"); // एक हजार दुई सय चौतीस रुपैया पचास पैसा मात्र
convert("1234.50", "toEnWord", "currency"); // one thousand two hundred and thirty-four dollars and fifty cents

⚠️ Error Handling

The converter provides clear error messages if:

  • An invalid method name is used.
  • An invalid number is provided.
  • The number exceeds the supported range (0 to 1.2 trillion).
  • An incorrect value type is supplied.

Example (English):

convert("1300000000000", "toEnWord");
// Error: Number not supported. Please enter a number between 0 and 1.2 trillion

Example (Nepali):

convert("1300000000000", "toNpWord");
// Error: संख्या समर्थित छैन। कृपया ० देखि १.२ खर्ब बीचको संख्या प्रविष्ट गर्नुहोस्

📝 Notes

  • Supports number conversion up to 1.2 trillion (English) and १.२ खर्ब (Nepali).
  • Handles decimals for accurate currency formatting.
  • Accepts both string and number inputs.
  • Provides bilingual error messages.
  • Includes TypeScript type definitions.

📄 License

This project is licensed under the MIT License. Feel free to use and modify it in your projects.

Keywords: Nepali, number converter, English to Nepali, Nepali words, currency conversion, localization, i18n, npm package, nepali-words, numeral conversion, number-to-nepali-words