{"id":19527708,"url":"https://github.com/jukbot/thai-citizen-id-validator","last_synced_at":"2026-03-05T22:31:10.220Z","repository":{"id":40633915,"uuid":"133488742","full_name":"jukbot/thai-citizen-id-validator","owner":"jukbot","description":"🇹🇭 Thai Citizen ID validator with zero dependencies ","archived":false,"fork":false,"pushed_at":"2025-04-14T05:59:58.000Z","size":994,"stargazers_count":77,"open_issues_count":1,"forks_count":14,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-01T23:40:16.792Z","etag":null,"topics":["hacktoberfest","qodona","thai-id","thailand","validation","validation-library","validator"],"latest_commit_sha":null,"homepage":"https://jukbot.github.io/thai-citizen-id-validator/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jukbot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-05-15T08:56:50.000Z","updated_at":"2025-08-09T08:40:38.000Z","dependencies_parsed_at":"2023-09-21T21:59:01.530Z","dependency_job_id":"96dc7c93-8cab-43d0-9209-217a9f8e6249","html_url":"https://github.com/jukbot/thai-citizen-id-validator","commit_stats":{"total_commits":119,"total_committers":7,"mean_commits":17.0,"dds":"0.24369747899159666","last_synced_commit":"4ddec18d8071ebdfaefcf0624e2e5daa7f75c70a"},"previous_names":["jukbot/thai-national-id-validator"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/jukbot/thai-citizen-id-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jukbot%2Fthai-citizen-id-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jukbot%2Fthai-citizen-id-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jukbot%2Fthai-citizen-id-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jukbot%2Fthai-citizen-id-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jukbot","download_url":"https://codeload.github.com/jukbot/thai-citizen-id-validator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jukbot%2Fthai-citizen-id-validator/sbom","scorecard":{"id":541243,"data":{"date":"2025-08-11","repo":{"name":"github.com/jukbot/thai-citizen-id-validator","commit":"4fe470ec7daf34312b126ad2caa9726b5fa61771"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/code_quality.yml:16","Warn: jobLevel 'checks' permission set to 'write': .github/workflows/code_quality.yml:18","Warn: no topLevel permission defined: .github/workflows/code_quality.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/deploy_demo.yml:12"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/code_quality.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/jukbot/thai-citizen-id-validator/code_quality.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/code_quality.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/jukbot/thai-citizen-id-validator/code_quality.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/code_quality.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/jukbot/thai-citizen-id-validator/code_quality.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/code_quality.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/jukbot/thai-citizen-id-validator/code_quality.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy_demo.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/jukbot/thai-citizen-id-validator/deploy_demo.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy_demo.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/jukbot/thai-citizen-id-validator/deploy_demo.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy_demo.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/jukbot/thai-citizen-id-validator/deploy_demo.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy_demo.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/jukbot/thai-citizen-id-validator/deploy_demo.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":10,"reason":"SAST tool detected","details":["Info: SAST configuration detected: Qodana","Warn: 1 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T08:15:34.939Z","repository_id":40633915,"created_at":"2025-08-20T08:15:34.939Z","updated_at":"2025-08-20T08:15:34.939Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30152839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T21:15:50.531Z","status":"ssl_error","status_checked_at":"2026-03-05T21:15:11.173Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","qodona","thai-id","thailand","validation","validation-library","validator"],"created_at":"2024-11-11T01:16:09.664Z","updated_at":"2026-03-05T22:31:10.195Z","avatar_url":"https://github.com/jukbot.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Thai Citizen ID Validator\n\n![thai-citizen-id-validator](https://socialify.git.ci/jukbot/thai-citizen-id-validator/image?description=1\u0026language=1\u0026name=1\u0026owner=1\u0026pattern=Solid\u0026stargazers=1\u0026theme=Light)\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d49ee28fb17b476baeb9387e6888b751)](https://app.codacy.com/gh/jukbot/thai-citizen-id-validator/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![NPM Download](https://img.shields.io/npm/dt/thai-id-validator.svg)](https://www.npmjs.com/package/thai-id-validator)\n[![javascript style guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![npm](https://img.shields.io/npm/v/thai-id-validator.svg)](https://www.npmjs.com/package/thai-id-validator)\n[![JSR](https://jsr.io/badges/@jukbot/thai-id-validator)](https://jsr.io/@jukbot/thai-id-validator)\n\nA simpler way to validate Thai Citizen Card ID. 🇹🇭\n\n## Minimum Node.js Version ⚠️\n\nThis package requires Node.js version 16 or later.\n\n## Future Roadmap\n\n- Go Language Implementation Example\n- .NET Language Implementation Example\n- Thai Passport Number Validation\n\n## Read the article\n\n[Building Thai Citizen ID Input Validation with WCAG Standard](https://medium.com/@juk/%E0%B8%A5%E0%B8%AD%E0%B8%87%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87%E0%B8%9F%E0%B8%AD%E0%B8%A3%E0%B9%8C%E0%B8%A1%E0%B8%95%E0%B8%A3%E0%B8%A7%E0%B8%88%E0%B8%AA%E0%B8%AD%E0%B8%9A%E0%B9%80%E0%B8%A5%E0%B8%82%E0%B8%9A%E0%B8%B1%E0%B8%95%E0%B8%A3-%E0%B8%9B%E0%B8%8A%E0%B8%8A-%E0%B8%9E%E0%B8%A3%E0%B9%89%E0%B8%AD%E0%B8%A1%E0%B8%A1%E0%B8%B2%E0%B8%95%E0%B8%A3%E0%B8%90%E0%B8%B2%E0%B8%99-wcag-13b2c8c9d015)\n\n## Installation\n\nWorks with npm, jsr, yarn, pnpm, bun or deno\n\n```bash\n$ npm install thai-id-validator\n# or\n$ yarn add thai-id-validator\n# or\n$ pnpm add thai-id-validator\n# or\n$ bun add thai-id-validator\n# or\n$ pnpm dlx jsr add @jukbot/thai-id-validator\n# or\n$ deno add jsr:@luca/flag\n```\n\n## Data Type\n\n| Input  | Output  |\n| ------ | :-----: |\n| String | boolean |\n\n## Usage\n\n### Javascript / Typescript\n\nIn Javascript, Typescript file, you can use import, export modules\n\n```javascript\nimport isValidThaiID from 'thai-id-validator';\n\nlet result = isValidThaiID(‘1101700207030’);\n\nconsole.log(result);\n// true\n```\n\n## Test\n\nTo run all test cases run the following command\n\n```bash\nbun run test\n```\n\nYou can edit validator.test.js too add your custom test case.\n\n| Test Cases      | Result |\n| --------------- | :----: |\n| '1112034563562' |   ✅   |\n| '0113200420331' |   ✅   |\n| '1101700230705' |   ❌   |\n| '110170023073'  |   ❌   |\n| '11017002070d3' |   ❌   |\n| 'rytege54fsfsf' |   ❌   |\n| 0               |   ❌   |\n| '-'             |   ❌   |\n| ''              |   ❌   |\n| null            |   ❌   |\n| undefined       |   ❌   |\n| 'blablabla'     |   ❌   |\n\n`(Tested with Bun)`\n\n### Test Result Screenshot\n\n \u003cimg src=\"test-result.png\" width=\"500\"/\u003e\n\n### How to upload test coverage report to codacy\n\n```zsh\nexport CODACY_PROJECT_TOKEN=xxxxxxxxx\n\nbun run coverage\n\nbash \u003c(curl -Ls https://coverage.codacy.com/get.sh)\n```\n\n## Compatibility\n\nTested on all modern browsers ✅\n\n## Issues\n\nIf you found any 🐞 or feedback, please report the issue [here](https://github.com/jukbot/thai-citizen-id-validator/issues)\n\n## Contribution\n\n👩🏻‍💻 Contribute are always welcome.\n\n## License\n\n[MIt](https://opensource.org/license/mit)\n\nCode with love 🦉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjukbot%2Fthai-citizen-id-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjukbot%2Fthai-citizen-id-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjukbot%2Fthai-citizen-id-validator/lists"}