npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

higher-edu-morocco

v1.0.1

Published

Typed dataset & helpers for Moroccan universities and grandes écoles

Readme


Higher-Ed Morocco 🇲🇦

A simple, zero-dependency Node.js package providing structured and typed data about universities and higher-education institutions in Morocco.


📦 Installation

npm install higher-edu-morocco

Or via yarn/pnpm:

yarn add higher-edu-morocco
pnpm add higher-edu-morocco

🚀 Usage

JavaScript/TypeScript

import {
  getAllInstitutions,
  filterInstitutionsByType,
  filterInstitutionsByCity,
  searchInstitutions,
} from "higher-edu-morocco";

// List all institutions
console.log(getAllInstitutions());

// Filter by type
console.log(filterInstitutionsByType("engineering_school"));

// Find by city
console.log(filterInstitutionsByCity("Rabat"));

// Find by state recognition

console.log(filterInstitutionsByRecognition(true));

// Fuzzy search
console.log(searchInstitutions("ENSA"));

CLI Usage

Run commands directly using npx:

npx higher-edu-ma list
npx higher-edu-ma list --type engineering_school
npx higher-edu-ma list --city Casablanca
npx higher-edu-ma search ENSA

📖 API

getAllInstitutions(): Institution[]

Returns an array of all Moroccan higher-education institutions.

filterInstitutionsByType(id: string): Institution | undefined

Fetches a single institution by its unique id.

filterInstitutionsByType(type: InstitutionType): Institution[]

Returns institutions filtered by type (public_university, private_university, engineering_school, etc.).

filterInstitutionsByCity(city: string): Institution[]

Returns institutions located in a specified city.

filterInstitutionsByRecognition(recognized: boolean | undefined): Institution[]

Returns institutions with a specified state recognition status (true, false, or undefined).

searchInstitutions(term: string): Institution[]

Fuzzy searches institutions by name or city.


🔍 Data Schema

Each institution has:

interface Institution {
  id: string; // Unique slug identifier
  name: string; // Official institution name
  city: string; // Main campus city
  type: InstitutionType;
  website: string; // Official website URL
  phone: string; // Phone number
  recognized_by_state: boolean | undefined; // State recognition status
  address: string; // Street address
  lat: number; // Latitude
  lng: number; // Longitude
}

🛠 CLI Reference

Commands:

higher-edu-ma list          # Lists all institutions
higher-edu-ma search <term> # Searches institutions by name or city

Options:

  • --type, -t: Filter by institution type.
  • --city, -c: Filter by city.
  • --json, -j: Output as JSON.

Example:

higher-edu-ma list --type public_university
higher-edu-ma search Rabat --json

🚨 Issues & Contributions

Report issues or contribute on GitHub:


📜 License

MIT © Anas Behhari