https://github.com/jojoee/thaiid
Verify and random Thai Nationality ID
https://github.com/jojoee/thaiid
random thai thai-id thailand validator verify
Last synced: 6 months ago
JSON representation
Verify and random Thai Nationality ID
- Host: GitHub
- URL: https://github.com/jojoee/thaiid
- Owner: jojoee
- License: mit
- Created: 2020-05-12T04:01:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T10:12:58.000Z (over 3 years ago)
- Last Synced: 2025-03-26T05:51:10.040Z (7 months ago)
- Topics: random, thai, thai-id, thailand, validator, verify
- Language: JavaScript
- Homepage: https://jojoee.github.io/thaiid/
- Size: 26.4 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-en.md
- License: LICENSE
Awesome Lists containing this project
README
# thaiID
[](https://codecov.io/github/jojoee/thaiid)
[](https://www.npmjs.com/package/thaiid)
[](http://opensource.org/licenses/MIT)
[](https://github.com/semantic-release/semantic-release)
[](https://greenkeeper.io/)



Language: [ไทย](https://github.com/jojoee/thaiid/blob/master/README.md), [English](https://github.com/jojoee/thaiid/blob/master/README-en.md)
Fastest Thai Nationality ID verify and random
## Installation
```
// CommonJS
npm install thaiid
const thaiId = require('thaiid')// githack
// ES6
npm install thaiid
import * as thaiId from 'thaiid'
```## Example usage
```javascript
thaiId.random() // "3629525599913"
thaiId.random() // "9065089544709"thaiId.verify('1915197333804') // true
thaiId.verify('1201131963762') // false
```## Note
- [x] Compatible with all browsers
- [x] Node.js version support: 6+
- [x] 0 Dependencies
- [x] Unit test
- [ ] Browser compatibility test
- [ ] Support negative number
- [ ] Other programming languages version## Reference
- [ปริศนาของเลขบัตรประชาชน13 หลัก](https://www.youtube.com/watch?v=tSlNbe_ss58)
- [เลขประจำตัวประชาชนไทย](https://th.wikipedia.org/wiki/เลขประจำตัวประชาชนไทย)
- [เลข 13 หลักในบัตรประชาชนสำคัญฉันใด](https://www.egov.go.th/th/content/817/78/)
- [ไขปริศนาเลขบัตรประชาชนไทย 13 หลัก](https://www.moe.go.th/ไขปริศนาเลขบัตรประชาชน)