{"id":22066777,"url":"https://github.com/gift-stack/regex-lite","last_synced_at":"2025-05-13T02:04:39.569Z","repository":{"id":212393477,"uuid":"731369840","full_name":"Gift-Stack/regex-lite","owner":"Gift-Stack","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-30T18:05:40.000Z","size":56,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-13T02:04:31.806Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Gift-Stack.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":"2023-12-13T23:44:23.000Z","updated_at":"2024-01-04T17:47:38.000Z","dependencies_parsed_at":"2023-12-14T02:56:06.255Z","dependency_job_id":"401462ac-765d-4d2c-825a-34b45be0da2a","html_url":"https://github.com/Gift-Stack/regex-lite","commit_stats":null,"previous_names":["gift-stack/regex-helper","gift-stack/regex-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gift-Stack%2Fregex-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gift-Stack%2Fregex-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gift-Stack%2Fregex-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gift-Stack%2Fregex-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gift-Stack","download_url":"https://codeload.github.com/Gift-Stack/regex-lite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253856655,"owners_count":21974581,"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":[],"created_at":"2024-11-30T19:29:01.624Z","updated_at":"2025-05-13T02:04:39.548Z","avatar_url":"https://github.com/Gift-Stack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regex Lite\n\n## Description\n\n`regex-lite` is a TypeScript utility library designed to simplify the creation and validation of regular expressions. This library provides a fluent, chainable interface to build complex regular expressions with ease and readability.\n\n## Features\n\n- Fluent and chainable API\n- Easy construction of complex regex patterns\n- Built-in validators for common use-cases like email, URL, phone numbers, etc.\n- Customizable and extendable\n- Fully typed with TypeScript for better development experience\n\n## Installation\n\n```bash\nbun i regex-lite\n```\n\nor\n\n```bash\nnpm install regex-lite\n```\n\nor\n\n```bash\nyarn add regex-lite\n```\n\n## Usage\n\nHere's a quick example to get you started:\n\n```typescript\nimport regex, { validate } from \"regex-lite\";\n\nconst pattern = regex(\"Your test string\")\n  .hasText()\n  .hasNumbers()\n  .hasSpecialCharacter()\n  .min(8)\n  .max(20);\n\nconsole.log(validate(pattern)); // true or false based on the validation\n```\n\n## API Reference\n\n[Bun Doc](http://bun.sh)\n\n### Example Methods\n\n- `hasText()`: Ensures the string contains text (a-z, A-Z).\n- `hasNumbers()`: Ensures the string contains numbers.\n- `hasSpecialCharacter()`: Ensures the string contains special characters.\n- `min(length: number)`: Sets the minimum length of the string.\n- `max(length: number)`: Sets the maximum length of the string.\n- `validate()`: Executes the validation and returns a boolean result.\n\n## Contributing\n\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n## Contact\n\nGift Opia - [gkenny896@gmail.com](mailto:gkenny896@gmail.com)\n\nTwitter - [@theNameIsGiFTED](http://twitter.com/theNameIsGiFTED)\n\nProject Link: [https://github.com/Gift-Stack/regex-lite](https://github.com/Gift-Stack/regex-lite)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgift-stack%2Fregex-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgift-stack%2Fregex-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgift-stack%2Fregex-lite/lists"}