JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 263
  • Score
    100M100P100Q127629F
  • License ISC

thai id card check/generate

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-card

Javascipt

var thaiIdCard = require('thai-id-card') // for ES5
or
import thaiIdCard from 'thai-id-card'; // for ES6

USAGE

var result = thaiIdCard.verify(1101700207030);
// return true

Test

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)