{"id":15762723,"url":"https://github.com/ramonpaolo/validation-documents","last_synced_at":"2025-04-21T04:31:27.773Z","repository":{"id":65348459,"uuid":"579384463","full_name":"ramonpaolo/validation-documents","owner":"ramonpaolo","description":"Package npm to validate and create CPF and CNPJ","archived":false,"fork":false,"pushed_at":"2023-07-20T07:11:13.000Z","size":268,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T08:05:52.596Z","etag":null,"topics":["good-first-issue","javascript","nodejs","npm","opensource","typescript","typesript","validation"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/validate-documents?activeTab=readme","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/ramonpaolo.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":"2022-12-17T14:15:04.000Z","updated_at":"2025-01-09T19:59:46.000Z","dependencies_parsed_at":"2024-10-25T10:19:04.100Z","dependency_job_id":"e016d978-e565-44d4-b1f3-8a3dcceefb74","html_url":"https://github.com/ramonpaolo/validation-documents","commit_stats":{"total_commits":42,"total_committers":1,"mean_commits":42.0,"dds":0.0,"last_synced_commit":"ff18e138c1c8fff0406cdc8fb03647585c554ad2"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramonpaolo%2Fvalidation-documents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramonpaolo%2Fvalidation-documents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramonpaolo%2Fvalidation-documents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramonpaolo%2Fvalidation-documents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramonpaolo","download_url":"https://codeload.github.com/ramonpaolo/validation-documents/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249996094,"owners_count":21358061,"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":["good-first-issue","javascript","nodejs","npm","opensource","typescript","typesript","validation"],"created_at":"2024-10-04T11:21:57.209Z","updated_at":"2025-04-21T04:31:27.472Z","avatar_url":"https://github.com/ramonpaolo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Validate Documents\n\n\u003cdiv align=\"center\"\u003e\n\n[![Run Tests](https://github.com/ramonpaolo/validation-documents/actions/workflows/ci.yml/badge.svg)](https://github.com/ramonpaolo/validation-documents/actions/workflows/ci.yml)\n![Code Size](https://img.shields.io/github/languages/code-size/ramonpaolo/validation-documents?style=flat-square)\n![Downloads](https://img.shields.io/npm/dm/validate-documents?style=flat-square)\n![LICENSE](https://img.shields.io/npm/l/validate-documents?style=flat-square)\n\n\u003c/div\u003e\n\n---\n\n## Index\n- [What is it?](#what-is-it)\n- [What technologies this project use?](#what-technologies-this-project-use)\n- [How install it?](#how-install-it)\n- [Example of use](#example-of-use)\n\n---\n\n## What is it?\nThis project, is a lib to validate oficial documents in Brazil. This validate CPF and CNPJ.\n\n---\n\n## What technologies this project use?\n- Node.Js\n    - TypeScript\n    - Jest\n\n---\n\n## How install it?\nIt's simple, just run the command in the terminal, example:\n```bash\n# Installing package\n\n# Yarn\n$ yarn add validate-documents\n\n# npm\n$ npm install validate-documents\n```\n\n---\n\n## Exemple of use:\n\n### Validate Documents\n\n```javascript\nimport { validateCpf } from 'validate-documents'\n\nconst isValidCpf = validateCpf('72994324040')\n\nif(isValidCpf) {\n    // Follow the flow with valid CPF, how create user\n}else{\n    // Follow the flow with invalid CPF, how return response with error and status code 400 \n}\n```\n\n### Create Fake Document Number\n\n```javascript\nimport { createFakeCpf } from 'validate-documents'\n\ntry {\n    const cpfCreated = createFakeCpf()\n    console.log('created CPF:', cpfCreated)\n} catch (error) {\n    console.error({\n        error_name: error.name, // Error\n        error_message: error.message, // Max retry to create fake cpf was hit\n    })\n}\n```\n\n###### Made with Love by Ramon Paolo Maram :3","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framonpaolo%2Fvalidation-documents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framonpaolo%2Fvalidation-documents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framonpaolo%2Fvalidation-documents/lists"}