Skip to content

urtuba/tc-id

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tc-id

tc-id is a package to validate Turkish Citizenship Identity Numbers. You can simply use it as:

import { validateTCID } from "tc-id";

const id = "YOUR_TC_ID";

const validatedId = validateTCID(id);

It throws error if validation falied. It returns its input as result. You may use function with both numbers and strings. You may include additional returnType argument, which is "string" by default. "number" is also allowed.

const id = "YOUR_TC_ID";

const validatedId = validateTCID(id, "number")

NOTE: It is not guaranteed to validated TC ID number is been having by someone. It is not verification, just validation works with TC_ID derivation rules.