{"id":17434622,"url":"https://github.com/radarsu/validate-polish","last_synced_at":"2025-04-14T16:13:14.642Z","repository":{"id":37431844,"uuid":"58518025","full_name":"radarsu/validate-polish","owner":"radarsu","description":"Utility library for validation of PESEL, NIP, REGON, identity card etc. Aimed mostly at Polish enviroment. [Polish] Walidacja numerów pesel, nip, regon, dowodu osobistego.","archived":false,"fork":false,"pushed_at":"2023-03-27T18:27:50.000Z","size":643,"stargazers_count":43,"open_issues_count":4,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T16:12:53.074Z","etag":null,"topics":["identity-card","identity-card-validation","identitycard","javascript","javascript-library","nip","node","nodejs","nodejs-library","pesel","pesel-validation","polish","polish-language","polski","polskie","regon","regon-validation","typescript","typescript-library","validation-library"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/radarsu.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-11T05:57:31.000Z","updated_at":"2025-02-27T12:06:42.000Z","dependencies_parsed_at":"2024-11-07T06:36:18.140Z","dependency_job_id":"b1a612a5-3011-4932-b96c-ba71f7e3e4f9","html_url":"https://github.com/radarsu/validate-polish","commit_stats":{"total_commits":6,"total_committers":3,"mean_commits":2.0,"dds":0.5,"last_synced_commit":"faa224633362b447c39cef15a8be4496c59604c9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radarsu%2Fvalidate-polish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radarsu%2Fvalidate-polish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radarsu%2Fvalidate-polish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radarsu%2Fvalidate-polish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radarsu","download_url":"https://codeload.github.com/radarsu/validate-polish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248914115,"owners_count":21182359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["identity-card","identity-card-validation","identitycard","javascript","javascript-library","nip","node","nodejs","nodejs-library","pesel","pesel-validation","polish","polish-language","polski","polskie","regon","regon-validation","typescript","typescript-library","validation-library"],"created_at":"2024-10-17T09:07:57.584Z","updated_at":"2025-04-14T16:13:14.616Z","avatar_url":"https://github.com/radarsu.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/radarsu"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ch1\u003evalidate-polish\u003c/h1\u003e\n    \u003cdiv\u003eUtility library for validation of PESEL, NIP, REGON, and identity card numbers. Aimed mostly at the Polish environment.\u003c/div\u003e\n    \u003cdiv\u003e[Polish] Walidacja numerów PESEL, NIP, REGON, oraz dowodu osobistego.\u003c/div\u003e\n\u003c/p\u003e\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/radarsu)\n\n## Table of contents\n\n1. [Getting Started](#getting-started)\n\n2. [Usage](#usage)\n\n3. [Features](#features)\n\n\n\n## Getting Started\n`npm i validate-polish`\n\n\n## Usage\n### General\n\n```ts\nimport { validatePolish } from 'validate-polish';\n\nif (!validatePolish.pesel(`92060512181`)) {\n    throw new Error(`Invalid pesel.`);\n}\n\nif (!validatePolish.nip('115667734')) {\n    throw new Error(`Invalid nip.`);\n}\n\nif (!validatePolish.regon(`1251677`)) {\n    throw new Error(`Invalid regon.`);\n}\n\nif (!validatePolish.identityCard(`14124142`)) {\n    throw new Error(`Invalid identity card.`);\n}\n```\n\n### Browser\n\nIn browser validate-polish package is wrapped twice `validatePolish.validatePolish`.\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/validate-polish@latest/dist/index.browser.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    console.log(validatePolish.validatePolish);\n\u003c/script\u003e\n```\n\n\n## Features\n-   **CDN** - available via cdn (https://cdn.jsdelivr.net/npm/validate-polish@latest/dist/index.browser.js)\n-   **Cross-platform** - works in Node.js, browser and with bundlers such as webpack\n-   **Fast, lightweight, 0 dependencies** - no dependencies ensure there are no security breaches from other packages\n-   **Maintained** - if you need additional functionality feel free to create PR or an Issue\n-   **Strongly typed** - library written fully in TypeScript\n-   **Supports PESEL, REGON (9 and 14), NIP, IDENTITY CARD** - also validates day and month correctness including century encoded in month.\n-   **Tested** - has tests on dozens of valid and invalid chunks of data to make sure validations are performed flawlessly\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradarsu%2Fvalidate-polish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradarsu%2Fvalidate-polish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradarsu%2Fvalidate-polish/lists"}