degachejs
Version:
A Tunisian utility library for working with CIN, phone numbers, addresses, and more
31 lines (30 loc) • 727 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VALID_PREFIXES = exports.COUNTRY_CODE = exports.CARRIERS = void 0;
/**
* Tunisian mobile carriers and their prefixes
*/
exports.CARRIERS = {
OOREDOO: {
name: "Ooredoo Tunisia",
prefixes: ["2", "5"],
},
ORANGE: {
name: "Orange Tunisia",
prefixes: ["4", "5"],
},
TELECOM: {
name: "Tunisie Telecom",
prefixes: ["2", "9"],
},
};
/**
* Country calling code for Tunisia
*/
exports.COUNTRY_CODE = "+216";
/**
* All valid mobile prefixes
*/
exports.VALID_PREFIXES = Array.from(new Set(Object.values(exports.CARRIERS)
.map((carrier) => carrier.prefixes)
.flat()));