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

zellige.js

v0.0.3-development

Published

A Moroccan utility library for working with CIN, phone numbers, currency, addresses, dates, and more.

Readme

codecov

Zellige.js

Zellige.js is a simple, powerful utility package designed to handle all the boring stuff—like validating CINs, phone numbers, IBANs, RIBs, and passports—specific to Morocco.

Why Use Zellige.js? 🤔

Let's face it—you’re tired of Googling how to validate a CIN, phone number, IBAN, or passport every time you start a new project. And if you're like most developers, you probably end up copying and pasting validation code from old projects or Stack Overflow, only to realize it's never quite right.

With Zellige.js, you get everything you need in one package—properly validated and tested for Morocco-specific fields. It saves you time, reduces errors, and means you don’t have to rewrite the same functions over and over again.

Why spend time reinventing the wheel when you could just install Zellige and move on to the more important tasks?

import { validateCIN } from 'zellige.js';

// Simple and intuitive API
const result = validateCIN('AB123456');

🚀 Features (Please contribute for more 🙏)

CIN (National ID) Processing

  • 🔍 Advanced validation algorithms
  • 🎨 Flexible formatting options
  • 🏢 Region and office information extraction
  • 🛡️ Built-in security features

Phone Number Utilities (WIP)

  • 📱 Support for all Moroccan carriers
  • 🔄 International format conversion
  • ✨ Smart formatting options
  • ⚡ Carrier detection

Bank Account Processing (WIP)

  • 🏦 Support for major Moroccan banks
  • 🔢 RIB validation
  • 📊 Bank information extraction
  • 🔐 Secure handling

Passport Processing

  • 🛂 Moroccan passport validation
  • 🔍 Series and number validation

💻 Installation

npm install zellige.js
# or
yarn add zellige
# or
pnpm add zellige

🎯 Quick Start

import { formatCIN, validatePhoneNumber, getBankInfo } from 'zellige.js';

// Format a CIN
const formattedCIN = formatCIN('AB123456', {
  format: 'spaced',
  case: 'upper',
}); // => 'AB 123 456'

// Validate a phone number
const isValidPhone = validatePhoneNumber('+212612345678');

// Get bank information
const bankDetails = getBankInfo('007123456789012345678901');

🛠️ Type Safety

Zellige is built with TypeScript at its core, providing:

interface CINOptions {
  format: 'spaced' | 'dashed' | 'compact';
  case: 'upper' | 'lower';
  includeMeta?: boolean;
}

// All functions come with detailed type definitions
const result: CINValidationResult = validateCIN('AB123456');

🤝 Contributing

We welcome contributions! Whether it's:

  • 🐛 Bug fixes
  • ✨ New features
  • 📚 Documentation improvements
  • 🧪 Additional test cases

Check out our Contributing Guide to get started.

📄 License

Zellige is MIT licensed. See the LICENSE file for details.

🌟 Support

🏆 Production Ready

  • ✅ Comprehensive error handling
  • 🔒 Input sanitization
  • ⚡ Performance optimized
  • 🧪 Extensive test coverage
  • 📚 Detailed documentation

Built with ❤️ for the Moroccan developer community