Файл-утилита для верификации ИИН/БИН и добыча данных из 12 цифр)
Что такое ИИН/БИН
Build: npm install && npm run build
Demos: npm install && npm start
import iinbinFunc,{options} from './iinbin';
let iinbin = new iinbinFunc();
iinbin.value = '901123300254';
console.info(iinbin.type);
console.info(iinbin.value);
console.info(iinbin.methods);
if (iinbin.type==='IIN'){
console.info(`gender: ${iinbin.methods.gender()}`);
console.info(`registrationNumber: ${iinbin.methods.registrationNumber()}`);
console.info(`birthCentury: ${iinbin.methods.birthCentury()}`);
console.info(`birthDay: ${iinbin.methods.birthDay()}`);
console.info(`birthMonth: ${iinbin.methods.birthMonth()}`);
console.info(`birthYear: ${iinbin.methods.birthYear()}`);
console.info(`birthDate: ${iinbin.methods.birthDate()}`);
console.info(`birthDateLocale-ru: ${iinbin.methods.birthDateLocale('ru',options)}`);
console.info(`birthDateLocale-kz: ${iinbin.methods.birthDateLocale('kz',options)}`);
console.info(`birthDateLocale-en: ${iinbin.methods.birthDateLocale('en',options)}`);
}
if (iinbin.type==='BIN'){
console.info(`regMonth: ${iinbin.methods.regMonth()}`);
console.info(`regYear: ${iinbin.methods.regYear()}`);
console.info(`legalEntityType: ${iinbin.methods.legalEntityType()}`);
console.info(`legalEntityAttribute: ${iinbin.methods.legalEntityAttribute()}`);
}
console.dir(iinbin.data);
console.dir(iinbin.methods);