UNPKG

french-ssn

Version:

🇫🇷 A parser / validator for French Social Security Number

15 lines • 643 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const getControlKey_1 = __importDefault(require("./getControlKey")); exports.default = (partialSsn, controlKey) => { if (controlKey !== "98") { const expectedControlKey = (0, getControlKey_1.default)(partialSsn); if (controlKey != expectedControlKey) { throw new Error(`Control key does not match (expected ${expectedControlKey})`); } } }; //# sourceMappingURL=checkControlKey.js.map