{"id":21894787,"url":"https://github.com/jonathanpalma/sivar-utils","last_synced_at":"2025-04-15T16:04:29.536Z","repository":{"id":40288136,"uuid":"252258238","full_name":"jonathanpalma/sivar-utils","owner":"jonathanpalma","description":"TS/JS utils para el desarrollo de sistemas salvadoreños 🇸🇻","archived":false,"fork":false,"pushed_at":"2023-01-07T16:38:27.000Z","size":1248,"stargazers_count":36,"open_issues_count":21,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-31T18:32:34.619Z","etag":null,"topics":["documento","dui","elsalvador","hacktoberfest","javascript","nit","sivar","typescript","validar"],"latest_commit_sha":null,"homepage":"https://jonathanpalma.github.io/sivar-utils","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/jonathanpalma.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},"funding":{"github":null,"patreon":"jonathanpalma","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-04-01T18:40:46.000Z","updated_at":"2024-05-10T17:26:42.000Z","dependencies_parsed_at":"2023-02-07T16:16:09.089Z","dependency_job_id":null,"html_url":"https://github.com/jonathanpalma/sivar-utils","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpalma%2Fsivar-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpalma%2Fsivar-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpalma%2Fsivar-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpalma%2Fsivar-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanpalma","download_url":"https://codeload.github.com/jonathanpalma/sivar-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226922399,"owners_count":17703772,"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":["documento","dui","elsalvador","hacktoberfest","javascript","nit","sivar","typescript","validar"],"created_at":"2024-11-28T13:28:30.426Z","updated_at":"2024-11-28T13:28:31.132Z","avatar_url":"https://github.com/jonathanpalma.png","language":"TypeScript","funding_links":["https://patreon.com/jonathanpalma"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003esivar-utils 🇸🇻\u003c/h1\u003e\n\n  \u003cp\u003eTS/JS utils para el desarrollo de sistemas salvadoreños (Validacion de docs DUI, NIT, etc...)\u003c/p\u003e\n\u003c/div\u003e\n\n[![Version][version-badge]][package]\n[![Build][build-badge]][build]\n[![Install Size][size-badge]][package-size]\n[![Downloads][downloads-badge]][npmcharts]\n[![PRs Welcome][prs-badge]][prs]\n[![Commitizen friendly][cz-badge]][cz]\n[![MIT License][license-badge]][license]\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-)\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n[![Watch on GitHub][github-watch-badge]][github-watch]\n[![Star on GitHub][github-star-badge]][github-star]\n[![Tweet][twitter-badge]][twitter]\n\n## Getting Started\n\n### Installation\n\n```\nnpm install --save sivar-utils\n```\n\n### Usage\n\n- #### isDUI\n\n```ts\nimport { isDUI } from 'sivar-utils';\n\nconst str = 'test';\nconst fakeDUI = '00000000-0';\nconst validDUI = '02495046-3'; // DISCLAIMER: taken from Google\n\nisDUI(str); // false\nisDUI(fakeDUI); // false\nisDUI(validDUI); // true\n```\n\n- #### isNIT\n\n```ts\nimport { isNIT } from 'sivar-utils';\n\nconst str = 'test';\nconst fakeNIT = '0000-000000-000-0';\nconst validNIT = '0614-051286-129-4'; // DISCLAIMER: taken from Google\nconst alsoValidNIT = '06140512861294';\n\nisNIT(str); // false\nisNIT(fakeNIT); // false\nisNIT(validNIT); // true\nisNIT(alsoValidNIT); // true\n```\n\n- #### isMobilePhoneNumber\n\n```ts\nimport { isMobilePhoneNumber } from 'sivar-utils';\n\nconst str = 'test';\nconst fakeMobilePhone = '9999-9999';\nconst validMobilePhone = '7071-1244'; // DISCLAIMER: taken from Google\n\nisMobilePhoneNumber(str); // false\nisMobilePhoneNumber(fakeMobilePhone); // false\nisMobilePhoneNumber(validMobilePhone); // true\n```\n\n- #### isResidentialPhoneNumber\n\n```ts\nimport { isResidentialPhoneNumber } from 'sivar-utils';\n\nconst str = 'test';\nconst fakeResidentialPhone = '5555-5555';\nconst validResidentialPhone = '2244-4777'; // DISCLAIMER: taken from Google\n\nisResidentialPhoneNumber(str); // false\nisResidentialPhoneNumber(fakeResidentialPhone); // false\nisResidentialPhoneNumber(validResidentialPhone); // true\n```\n\n- #### isPhoneNumber\n\n```ts\nimport { isPhoneNumber } from 'sivar-utils';\n\nconst str = 'test';\nconst fakePhone = '1234-5678';\nconst validPhone = '2591-3000'; /* or '7725-4747' */ // DISCLAIMER: taken from Google\n\nisPhoneNumber(str); // false\nisPhoneNumber(fakePhone); // false\nisPhoneNumber(validPhone); // true\n```\n\n- #### isPassport\n\n```ts\nimport { isPassport } from 'sivar-utils';\n\nconst str = 'test';\nconst fakePassport = '$03766021';\nconst validPassport = 'A12345678';\n\nisPassport(str); // false\nisPassport(fakePassport); // false\nisPassport(validPassport); // true\n```\n\n- #### isCarPlate\n\n```ts\nimport { isCarPlate } from 'sivar-utils';\n\nconst str = 'test';\nconst fakePlate = 'XY525929';\nconst validNationalPlate = 'N10731'; // DISCLAIMER: taken from Google\nconst validParticularPlate = 'p525929'; // DISCLAIMER: taken from Google\n\nisCarPlate(str); // false\nisCarPlate(fakePlate); // false\nisCarPlate(validNationalPlate); // true\nisCarPlate(validParticularPlate); // true\n```\n\n## Contributing\n\n### How to contribute?\n\nThis is a `commitizen friendly` repository, so instead of creating commits using `git commit`, please use our custom CLI by running:\n\n```sh\nnpm run cz\n```\n\n#### Formatting \u0026 Linting\n\nMake sure you have installed the following plugins on your Code Editor\n\n- [ESLint][url-eslint]\n- [Prettier][url-prettier]\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/alepaz\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/5847822?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAlejandro Paz\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/jonathanpalma/sivar-utils/commits?author=alepaz\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/jonathanpalma/sivar-utils/commits?author=alepaz\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://monge1h.com\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/38824634?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJorge Monge\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/jonathanpalma/sivar-utils/commits?author=Monge1h\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/jonathanpalma/sivar-utils/issues?q=author%3AMonge1h\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://ricardoerl.com\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/1808048?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRicardo Ramírez\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-ricardoerl\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/leosuncin\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/4307697?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJaime Leonardo Suncin Cruz\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/jonathanpalma/sivar-utils/commits?author=leosuncin\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/jonathanpalma/sivar-utils/commits?author=leosuncin\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"#ideas-leosuncin\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## License\n\nMIT © [jonathanpalma](https://github.com/jonathanpalma)\n\n[downloads-badge]: https://img.shields.io/npm/dm/sivar-utils.svg?style=flat-square\n[license-badge]: https://img.shields.io/npm/l/sivar-utils.svg?style=flat-square\n[license]: https://github.com/jonathanpalma/sivar-utils/blob/master/LICENSE\n[npmcharts]: http://npmcharts.com/compare/sivar-utils\n[package-size]: https://packagephobia.now.sh/result?p=sivar-utils\n[package]: https://www.npmjs.com/package/sivar-utils\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[prs]: http://makeapullrequest.com\n[build-badge]: https://img.shields.io/circleci/build/gh/jonathanpalma/sivar-utils?style=flat-square\n[build]: https://circleci.com/gh/jonathanpalma/sivar-utils\n[cz-badge]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square\n[cz]: http://commitizen.github.io/cz-cli/\n[size-badge]: https://flat.badgen.net/packagephobia/install/sivar-utils\n[version-badge]: https://img.shields.io/npm/v/sivar-utils.svg?style=flat-square\n[github-watch-badge]: https://img.shields.io/github/watchers/jonathanpalma/sivar-utils.svg?style=social\n[github-watch]: https://github.com/jonathanpalma/sivar-utils/watchers\n[github-star-badge]: https://img.shields.io/github/stars/jonathanpalma/sivar-utils.svg?style=social\n[github-star]: https://github.com/jonathanpalma/sivar-utils/stargazers\n[url-eslint]: https://eslint.org/\n[url-prettier]: https://prettier.io/\n[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20sivar-utils!%20https://github.com/jonathanpalma/sivar-utils\n[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/jonathanpalma/sivar-utils.svg?style=social\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanpalma%2Fsivar-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanpalma%2Fsivar-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanpalma%2Fsivar-utils/lists"}