{"id":22685562,"url":"https://github.com/wotancode/rutility","last_synced_at":"2025-08-10T20:04:44.518Z","repository":{"id":242974005,"uuid":"811007666","full_name":"wotanCode/RUTility","owner":"wotanCode","description":"A JavaScript library for validating and formatting Chilean RUTs (Rol Único Tributario). It provides functions to add/remove dots and dashes, validate formats, and calculate check digits.","archived":false,"fork":false,"pushed_at":"2025-03-12T15:01:06.000Z","size":69,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-30T13:45:07.056Z","etag":null,"topics":["chilean-rut","chilean-rut-utils","javascript-library","rut","rut-utilities","typescript-library"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/rutility","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/wotanCode.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["wotanCode"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":null}},"created_at":"2024-06-05T19:06:44.000Z","updated_at":"2025-03-12T15:01:11.000Z","dependencies_parsed_at":"2024-07-24T21:27:45.835Z","dependency_job_id":"5285f3db-e3b6-400f-b4f4-47bfba470c36","html_url":"https://github.com/wotanCode/RUTility","commit_stats":null,"previous_names":["wotancode/rutility","pedroelhumano/rutility"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/wotanCode/RUTility","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wotanCode%2FRUTility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wotanCode%2FRUTility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wotanCode%2FRUTility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wotanCode%2FRUTility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wotanCode","download_url":"https://codeload.github.com/wotanCode/RUTility/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wotanCode%2FRUTility/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269780615,"owners_count":24474682,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["chilean-rut","chilean-rut-utils","javascript-library","rut","rut-utilities","typescript-library"],"created_at":"2024-12-09T22:15:33.938Z","updated_at":"2025-08-10T20:04:44.486Z","avatar_url":"https://github.com/wotanCode.png","language":"TypeScript","funding_links":["https://github.com/sponsors/wotanCode"],"categories":[],"sub_categories":[],"readme":"[npm-version-shield]: https://img.shields.io/npm/v/rutility?style=flat\u0026colorA=000000\u0026colorB=000000\n[npm-downloads-shield]: https://img.shields.io/npm/dt/rutility.svg?style=flat\u0026colorA=000000\u0026colorB=000000\n[npm-url]: https://www.npmjs.com/package/rutility\n[github-stars-shield]: https://img.shields.io/github/stars/wotanCode/rutility?style=flat\u0026colorA=000000\u0026colorB=000000\n[github-url]: https://github.com/wotanCode/rutility\n\n[![Version][npm-version-shield]][npm-url]\n[![Downloads][npm-downloads-shield]][npm-url]\n[![GitHub Stars][github-stars-shield]][github-url]\n\n\n# RUTility\n## Chilean RUT Validation and Formatting Library\n\nA library for validating and formatting the Chilean RUT (Rol Único Tributario). This library provides functions to format the RUT with dots and dashes, as well as to validate its format and check digit.\n\n## Installation\n\nYou can install the library using npm:\n\n```sh\nnpm install rutility\n```\n\n## Usage\n\n### Import in a Node.js Project\n```javascript\nconst { format, calculateDv, isValidRut, isFormat } = require('rutility');\n```\n\n### Import in an ES6 Module\n```sh\nimport { format, calculateDv, isValidRut, isFormat } from 'rutility';\n```\n\n### Formatting Functions\n\u003ctable border=\"1\"\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eFunction\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eExample\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eformat.dot(rut: string): string\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eFormats a RUT by adding dots.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003econsole.log(format.dot('12345678')); // '12.345.678'\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eformat.dash(rut: string): string\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eFormats a RUT by adding a dash.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003econsole.log(format.dash('123456780')); // '12345678-0'\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eformat.dotDash(rut: string): string\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eFormats a RUT by adding dots and a dash.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003econsole.log(format.dotDash('123456780')); // '12.345.678-0'\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eformat.notDot(rut: string): string\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eRemoves dots from a RUT.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003econsole.log(format.notDot('12.345.678-0')); // '12345678-0'\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eformat.notDash(rut: string): string\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eRemoves the dash and check digit from a RUT.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003econsole.log(format.notDash('12.345.678-0')); // '12.345.678'\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eformat.notDotDash(rut: string): string\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eRemoves dots and the dash from a RUT.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003econsole.log(format.notDotDash('12.345.678-9')); // '12345678'\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### Validation Functions\n\u003ctable border=\"1\"\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eFunction\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eExample\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ecalculateDv(rut: string | number): string\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eCalculates the check digit of a Chilean RUT.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003econsole.log(calculateDv('12.345.678')); // '5'\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eisValidRut(rut: string): boolean\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eValidates if a Chilean RUT is valid.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003econsole.log(isValidRut('12.345.678-5')); // true\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### Format Validations\n\u003ctable border=\"1\"\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eFunction\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eExample\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eisFormat.dot(rut: string): boolean\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eChecks if a RUT has the correct format with dots.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003econsole.log(isFormat.dot('12.345.678')); // true\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eisFormat.dash(rut: string): boolean\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eChecks if a RUT has the correct format with a dash.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003econsole.log(isFormat.dash('12345678-9')); // true\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eisFormat.dotDash(rut: string): boolean\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eChecks if a RUT has the correct format with dots and a dash.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003econsole.log(isFormat.dotDash('12.345.678-9')); // true\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Contributing\nIf you wish to contribute to this project, please open an issue or submit a pull request.\n\n### Main Developer\n[![Contribuidores](https://contrib.rocks/image?repo=wotanCode/RUTility\u0026max=500\u0026columns=20)](https://github.com/wotanCode/RUTility/graphs/contributors)\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwotancode%2Frutility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwotancode%2Frutility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwotancode%2Frutility/lists"}