UNPKG

degachejs

Version:

A Tunisian utility library for working with CIN, phone numbers, addresses, and more

17 lines (16 loc) 446 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateCIN = void 0; /** * Regular expression for CIN validation */ const CIN_REGEX = /^\d{8}$/; /** * Validates a Tunisian CIN (Carte d'Identité Nationale) * @param cin - The CIN number to validate * @returns boolean indicating if the CIN is valid */ const validateCIN = (cin) => { return CIN_REGEX.test(cin); }; exports.validateCIN = validateCIN;