Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

turkish-id-checker

kaangokdemir17ISC3.0.0

A package which checks if a number or string is a valid Turkish ID or not and generates a random valid Turkish ID.

turkish-id-checker, id-checker, id-check, turkish-id-check, id-validation, turkish-id-validation, id-validate

readme

Turkish National ID Checker

License: MIT npm package downloads size

This is a simple Turkish National Id Checking package which created for developers to use in their form elements or any spesific usage.

Installation

npm i turkish-id-checker

Usage

let { checkId, generateId } = require('turkish-id-checker')

// Parameter should be a String or a Number
checkId('15973515680') // Returns an Object with status and display keys in it.
checkId('15973515680').status // Returns true
checkId(15973515680).display // Returns 'This is a valid Turkish National ID'

generateId() // Returns a random Turkish National ID

Live Demo

Visit Live Demo

Testing

npm run test

Build

npm run build

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Contributors

Kaan Gökdemir - Author (@kaangokdemir) - kaangokdemir.com

License

ISC

changelog

[2.0.0] - 2020-04-15

Changings

  • Package re-written with TypeScript