UNPKG

geezget

Version:

Convert numbers to Geʽez numerals (፩, ፪, ፫) and Amharic words - the traditional Ethiopian/Eritrean number system

100 lines (67 loc) 3.08 kB
# GeezGet ግዕዝ [![npm version](https://img.shields.io/npm/v/geezget.svg)](https://www.npmjs.com/package/geezget) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) Convert numbers to authentic **Geʽez numerals** (፩, ፪, ፫...) and **Amharic words** with this lightweight TypeScript library. Perfect for Ethiopian/Eritrean applications, historical projects, and cultural preservation. ## ✨ Features - **Accurate Conversion** to Geʽez numeral symbols (1 → ፩, 100 → ፩፻, 10,000 → ፩፼) - **Amharic Word Output** (1"አንድ", 100"አንድ መቶ") - **Range Generation** - Get sequences of converted numbers - **TypeScript Native** - Full type definitions included - **Zero Dependencies** - Lightweight and fast - **Bidirectional Support** - Numbers ↔ Geʽez symbols ↔ Amharic words ## 📦 Installation ```bash npm install geezget or yarn add geezget 🚀 Quick Start Generate Number Ranges typescript Copy import { GeezNumberService } from 'geezget'; const result = GeezNumberService.generateRange(10, 15); console.log(result); /* [ { number: 10, symbol: '፲', name: 'አስር' }, { number: 11, symbol: '፲፩', name: 'አስር አንድ' }, { number: 12, symbol: '፲፪', name: 'አስር ሁለት' }, ... ] */ Convert Single Numbers typescript import { GeezNumberService } from 'geezget'; // To Geʽez numeral console.log(GeezNumberService.toGeezSymbol(10000)); // "፩፼" or '፼' if your implementation simplifies 10000 // To Amharic words console.log(GeezNumberService.toAmharicName(10000)); // "አንድ እልፍ" 📚 Complete API Reference GeezNumberService.toGeezSymbol(number: number): string Converts numbers to Geʽez numerals. Example: typescript GeezNumberService.toGeezSymbol(100); // '፩፻' or '፻' if your implementation simplifies 100 GeezNumberService.toGeezSymbol(123); // "፩፻፳፫" GeezNumberService.toAmharicName(number: number): string Converts numbers to Amharic words. Example: typescript GeezNumberService.toAmharicName(100); // "አንድ መቶ" GeezNumberService.toAmharicName(2023); // "ሁለት ሺ ሃያ ሦስት" GeezNumberService.generateRange(from: number, to: number): GeezNumber[] Generates a range of converted numbers. Type Definition: typescript interface GeezNumber { number: number; // Original number (1-10000) symbol: string; // Geʽez numeral (፩, ፪...) name: string; // Amharic word form } 🌍 Cultural Context The Geʽez numbering system is one of the world's oldest numeral systems still in use today. Key features: 10,000 (፼) is the highest single unit Multiplicative system (100 = ፩ × ፻) Used in Ethiopian Orthodox churches, historical documents, and calendar systems ⚠️ Limitations Currently supports 1 to 10,000 (፩ to ፩፼) Does not support fractions/decimal numbers Negative numbers return empty strings