digit-to-words-nepali
Version:
A comprehensive TypeScript library for converting numbers to words in English and Nepali languages. Supports numbers up to 10^39 (Adanta Singhar), currency formatting, decimal handling with individual digit pronunciation, and BigInt. Zero dependencies, fu
25 lines (24 loc) • 1.05 kB
TypeScript
import { BaseConverter } from './baseConverter';
import { ConverterConfig, ConversionResult } from '../types/converterTypes';
/**
* NepaliConverter
* Converts numbers to Nepali words with support for currency, decimals, and custom mappings.
* Optimized for readability, maintainability, and performance.
*/
export declare class NepaliConverter extends BaseConverter {
constructor();
/**
* Convert decimal digits individually to Nepali words.
* @param decimal - The decimal string (e.g., "33")
* @param config - Conversion configuration
* @returns Array of individual digit words
*/
private convertDecimalDigitsIndividually;
/**
* Convert a number to Nepali words.
* @param num - The number to convert
* @param config - Conversion configuration (all fields required)
*/
convert(num: number | string | bigint, config: Required<ConverterConfig>): ConversionResult;
}
export declare const digitToNepaliWords: (num: number | string | bigint, config?: Partial<ConverterConfig>) => string;