← All projects

dz-wilayas

by @ay-ub

18

About this project

dz-wilayas A lightweight utility package for accessing and filtering Algerian province (wilaya) data. Installation Usage API getAllWilayas() Returns all available wilayas as an array of objects. getWilayaByCode(code) Finds a wilaya by its code. Parameters: code (number string) - The code of the wilaya Returns: The wilaya object Throws: Error if wilaya with specified code is not found getWilayaByName(name) Finds a wilaya by its name (case-insensitive). Parameters: name (string) - The name of the wilaya Returns: The wilaya object Throws: Error if wilaya with specified name is not found getWilayaByArName(arname) Finds a wilaya by its Arabic name (case-insensitive). Parameters: arname (string) - The Arabic name of the wilaya Returns: The wilaya object Throws: Error if wilaya with specified Arabic name is not found getWilayaByRegion(region) Finds all wilayas in a specific region (case-insensitive). Parameters: region (string) - The region name to filter by Returns: Array of wilaya objects in the specified region Throws: Error if no wilayas are found in the specified region License MIT

From the project README on GitHub

Stars
18
Forks
0
License
MIT
Last push
7 Jun 2025

Add this badge to your README

Show that your project is listed on Made in Algeria.

Made in Algeria
[![Made in Algeria](https://www.madeinalgeria.dev/badge/dz-wilayas.svg)](https://www.madeinalgeria.dev/projects/dz-wilayas)

Related projects