Package Exports
- thai-id-card
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (thai-id-card) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Thai National ID CARD
Usage
thaiIdCard.verify(id)
Installation
$ npm install thai-id-cardJavascipt
var thaiIdCard = require('thai-id-card') // for ES5
or
import thaiIdCard from 'thai-id-card'; // for ES6USAGE
var result = thaiIdCard.verify(‘1101700207030’);
// return trueTest
You can edit validator.test.js too add your custom test case.
| Test Cases | Result |
|---|---|
| 1112034563562 | ✅ |
| 1101700230705 | ❌ |
| 110170023073 | ❌ |
| 11017002070d3 | ❌ |
| rytege54fsfsf | ❌ |
| 0 | ❌ |
| '-' | ❌ |
| '' | ❌ |
| null | ❌ |
| 'blablabla' | ❌ |
(Tested with Jest)