Logo Lanfrica

KhalidRouissi1/degachejs

Domain:

digital infrastructure

Record type:

software
Creator:
Kha
Host:
Built to simplify common tasks for Tunisian developers โ€” from CIN & RIB validation to phone number formatting and tax ID checks. # ๐ŸŒด degache.js Tunisian Developer's Essential Utility Library ## Why degache.js? ๐Ÿค” Tired of rewriting validation code for Tunisian CIN, phone numbers, and tax IDs? `degache.js` is your go-to utility library for all things Tunisian! Named after the beautiful oasis city of Degache, this library brings the same refreshing relief to your development workflow. ## ๐Ÿš€ Features ### CIN (Carte d'Identitรฉ Nationale) ๐Ÿ†” ```typescript import { validateCIN } from 'degachejs'; // Simple validation const isValid = validateCIN('12345678'); // true ``` ### Phone Numbers ๐Ÿ“ฑ - โœ… Support for all Tunisian carriers (Ooredoo, Orange, Tunisie Telecom) - ๐Ÿ”„ International format conversion - ๐Ÿ“ž Smart formatting with country code - ๐Ÿข Carrier detection - ๐Ÿ”’ Strict mode validation ```typescript import { validatePhoneNumber, formatPhoneNumber, getCarrierInfo } from 'degachejs'; // Validate phone number const isValid = validatePhoneNumber('20123456'); // true // Validate with strict mode (no spaces or special characters allowed) const isStrictValid = validatePhoneNumber('20 123 456', { strict: true }); // false // Format phone number const formatted = formatPhoneNumber('20123456'); console.log(formatted); // +216 20 123 456 // Get carrier information const carrier = getCarrierInfo('20123456'); console.log(carrier); // { name: 'Ooredoo', prefixes: ['2'] } ``` ### Tax ID (Matricule Fiscal) ๐Ÿ’ผ ```typescript import { validateTaxID } from 'degachejs'; const isValid = validateTaxID('1234567A/P/M/000'); ``` ### Currency Formatting ๐Ÿ’ฐ ```typescript import { formatCurrency } from 'degachejs'; const amount = formatCurrency(1234.56); console.log(amount); // 1.234,560 ุฏูŠู†ุงุฑ ุชูˆู†ุณูŠ ``` ### Postal Codes ๐Ÿ“ฎ ```typescript import { validatePostalCode } from 'degachejs'; const isValid = validatePostalCode('1000'); // true for Tunis ``` ### Car Plates ๐Ÿš— ```typescript import { validateCarPlate, getCarPlateInfo } from 'degachejs'; // Validate car plate (Arabic format: XXX ุชูˆู†ุณ XXXX) const isValid = validate โ€ฆ