Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 827 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 827 Bytes

TCKimlikNo

Turkish Identification Number Verification & Validation Package for NodeJs. This package is inspired by https://github.com/deligoez/tckimlikno

Installation

npm i @demirjs/tckimlikno

Usage

import {validateTcKimlikNo} from '@demirjs/tckimlikno'

validateTcKimlikNo({
    name: 'yourName',
    surname: 'yourSurname',
    tc: 1,
    birthYear: 1
}).then(result => console.log(result))

How to verify a T.C. Kimlik No

If you want to verify only tcKimlikNo you could validate it using verifyTcKimlikNo function. You could use it for tcKimlikNo rule.

import {verifyTcKimlikNo} from '@demirjs/tckimlikno'

console.log(verifyTcKimlikNo('12345678901')) // false
console.log(verifyTcKimlikNo('10000000146')) // true