UNPKG

states-alg

Version:

This package offers all Algerian states and departments and the distance between them and the other states, as well as some information about each state

50 lines (41 loc) 2.09 kB
# What is states-alg package This package offers all Algerian states and departments and the distance between them and the other states, as well as some information about each state (repo)[https://github.com/othmanus/algeria-cities.git] # Installation `npm install states-alg` --save ``` const { getWByID, // البحث عن اسم الولاية برقمها الوطني getWNameAR, //البحث عن ولاية ما باسمها العربي getWByASCII, // البحث عن ولاية ما باسمها غير عربي getAllWillayaAR, // جميع الولاية بالترتيب بالعربي getAllWillayaASCII // جميع الولاية بالترتيب } = require('states-alg') ****** هنا تقدر تجيب معلومات على الولاية مثلا رقمها الوطني و الاسم وايضا البلديات التابعة لها const a = getWByID(01) | getWByASCII('adrar') | getWNameAR('أدرار') // return { id: 1, // الرقم الوطني nameAR: "أدرار", nameASCII: "Adrar", daira: [...] // جميع البلديات التابعة لها } ******* هنا تقدر تجيب جميع الولايات على شكل جدول كيما في المثال بالعربي const allWillayaArabic = getAllWillayaAR(); return ["أدرار", " الشلف" ....] ******* هنا تقدر تجيب جميع الولايات على شكل جدول كيما في المثال باللغة الاتينية const allWillayaArabic = getAllWillayaASCII() return [""Adrar", "Chlef" ...] ******* في هذا التحديث تقدر تبحث على بلدية بالعربي أو الاسم اللاتيني ويرجعلك معلومات على الولاية update 1.0.10: const getWillaya = getDairaASCII('أفلو') | getDairaArabic('Aflou') return { nameASCII: Name willaya, countDaira: count of dairas, extra: All object of willaya, } ```