{"id":19638289,"url":"https://github.com/ppbustamante/scala-stdnum","last_synced_at":"2025-02-26T22:17:51.876Z","repository":{"id":51334652,"uuid":"520358306","full_name":"ppbustamante/scala-stdnum","owner":"ppbustamante","description":"A Scala library to provide functions to handle, parse and validate standard numbers. ","archived":false,"fork":false,"pushed_at":"2024-12-15T05:53:59.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-09T17:14:51.961Z","etag":null,"topics":["chilean-rut","cuit","curp","dni","rfc","rut","scala","scala3"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ppbustamante.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-08-02T05:02:30.000Z","updated_at":"2024-12-15T05:53:05.000Z","dependencies_parsed_at":"2024-11-11T12:51:00.346Z","dependency_job_id":null,"html_url":"https://github.com/ppbustamante/scala-stdnum","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppbustamante%2Fscala-stdnum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppbustamante%2Fscala-stdnum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppbustamante%2Fscala-stdnum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppbustamante%2Fscala-stdnum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppbustamante","download_url":"https://codeload.github.com/ppbustamante/scala-stdnum/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240941516,"owners_count":19882063,"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":["chilean-rut","cuit","curp","dni","rfc","rut","scala","scala3"],"created_at":"2024-11-11T12:38:10.216Z","updated_at":"2025-02-26T22:17:51.856Z","avatar_url":"https://github.com/ppbustamante.png","language":"Scala","readme":"# scala-stdnum\n\n[![CI](https://github.com/ppbustamante/scala-stdnum/actions/workflows/scala.yml/badge.svg)](https://github.com/ppbustamante/scala-stdnum/actions/workflows/scala.yml)\n\nA Scala library to parse, validate and reformat standard numbers and codes in different formats. It contains a large collection of number formats.\n\nBasically any number or code that has some validation mechanism available or some common formatting is eligible for inclusion in this library.\n\n## Available formats\n\nCurrently, this package supports the following formats:\n\n- RUT (Rol Único Tributario, Chilean national tax number).\n- DNI (Documento Nacional de Identidad, Argentinian national identity number).\n- CUIT (Código Único de Identificación Tributaria, Argentinian tax number).\n- CBU (Clave Bancaria Uniforme, Argentine bank account number).\n- RFC (Registro Federal de Contribuyentes, Mexican tax number).\n- CURP (Clave Única de Registro de Población, Mexican personal ID.)\n- NIT (Número De Identificación Tributaria, Colombian identity code).\n- CNPJ (Cadastro Nacional da Pessoa Jurídica, Brazilian company identifier).\n- CPF (Cadastro de Pessoas Físicas, Brazilian national identifier).\n- RIF (Registro de Identificación Fiscal, Venezuelan VAT number).\n\nThese modules generally do not provide background information on the meaning and use of the specified numbers, only parsing and handling functions.\n\n## Interface\n\nAll modules implement a common interface. For example for RUT validation:\n\n```scala\nimport cl.mixin.stdnum.cl.RUT\n\nRUT.validate(\"39.232.415-1\")\nval res0: Either[ValidationError, String] = Right(392324151)\n\nRUT.validate(\"23.431.324-3\")\nval res1: Either[ValidationError, String] = Left(InvalidChecksum)\n```\n\nMost of these modules implement the following functions:\n\n- `validate()` validate the correctness of the passed number and return a compact representation of the number invalid\n  numbers are rejected with one of the exceptions from the stdnum.exceptions module\n- `compact()` return a compact representation of the number or code this function generally does not do validation but\n  may raise exceptions for wildly incorrect numbers\n- `format()` return a formatted version of the number in the preferred format this function generally expects to be\n  passed a valid number or code\n\nApart from the above, the module may add extra parsing, validation or conversion functions.\n\n## Requirements\n\nThe modules should not require any external Scala library and should be pure Scala. The modules are developed and tested with Scala 3.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppbustamante%2Fscala-stdnum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppbustamante%2Fscala-stdnum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppbustamante%2Fscala-stdnum/lists"}