tc-check
Version:
A Node.js and TypeScript package to validate Turkish citizens using first name, last name, birth year, and T.C. Kimlik Number via the official government API.
13 lines (12 loc) • 533 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const index_1 = require("./index");
const validator = new index_1.Validator();
const soap = new index_1.SoapService();
const api = new index_1.APIService(soap);
const service = new index_1.VerificationService(validator, api);
const fakeTc = validator.generateFakeTC();
const person = { firstName: 'Ali', lastName: 'Veli', birthYear: 1995, tc: fakeTc };
service.verify(person)
.then(result => console.log(result))
.catch(err => console.error(err));