tc-id
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

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.

MIT License

Package Sidebar

Install

npm i tc-id

Weekly Downloads

16

Version

1.1.2

License

MIT

Unpacked Size

8.05 kB

Total Files

7

Last publish

Collaborators

  • urtuba