https://github.com/urtuba/tc-id
Validate TC ID according to derivation rules.
https://github.com/urtuba/tc-id
npm-package tc-identity validation
Last synced: 4 months ago
JSON representation
Validate TC ID according to derivation rules.
- Host: GitHub
- URL: https://github.com/urtuba/tc-id
- Owner: urtuba
- License: mit
- Created: 2022-09-05T08:51:39.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-09T10:11:39.000Z (almost 4 years ago)
- Last Synced: 2025-09-08T22:45:06.421Z (9 months ago)
- Topics: npm-package, tc-identity, validation
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/tc-id
- Size: 24.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tc-id
`tc-id` is a package to validate Turkish Citizenship Identity Numbers. You can simply use it as:
```js
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.
```js
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](https://github.com/urtuba/turkish-id/blob/main/LICENSE)