{"id":17854771,"url":"https://github.com/mathiaskandelborg/regular-expressions","last_synced_at":"2025-04-02T17:25:01.032Z","repository":{"id":57352468,"uuid":"126713151","full_name":"MathiasKandelborg/Regular-Expressions","owner":"MathiasKandelborg","description":"General purpose regular expressions for JavaScript","archived":false,"fork":false,"pushed_at":"2018-03-30T00:11:31.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-09T08:40:24.128Z","etag":null,"topics":["practice","regexp","regexp-validation","regular-expression","typescript"],"latest_commit_sha":null,"homepage":"","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/MathiasKandelborg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-25T15:45:17.000Z","updated_at":"2021-03-16T07:26:19.000Z","dependencies_parsed_at":"2022-09-11T20:41:56.135Z","dependency_job_id":null,"html_url":"https://github.com/MathiasKandelborg/Regular-Expressions","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/MathiasKandelborg%2FRegular-Expressions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathiasKandelborg%2FRegular-Expressions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathiasKandelborg%2FRegular-Expressions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathiasKandelborg%2FRegular-Expressions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MathiasKandelborg","download_url":"https://codeload.github.com/MathiasKandelborg/Regular-Expressions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246858097,"owners_count":20845240,"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":["practice","regexp","regexp-validation","regular-expression","typescript"],"created_at":"2024-10-28T01:22:17.933Z","updated_at":"2025-04-02T17:25:01.009Z","avatar_url":"https://github.com/MathiasKandelborg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regular Expressions for JavaScript\n\nMade for the purpose of validating strings and arrays with regular expressions.\n\nThis package exposes API's through `/lib/utils`. So far you can:\n\n## Validate a single email\n\n```js\nimport {\n  EmailValidation,\n  EmailExp,\n} from 'regular-expression-validation/lib/EmailRegExp';\n\nEmailValidation(EmailExp, 'validate@this.email.com');\n```\n\n## Validate an array of emails\n\n```js\nimport {\n  EmailArrayValidation,\n  EmailExp,\n} from 'regular-expression-validation/lib/utils/EmailArrayRegExp';\nimport { EmailArray } from 'regular-expression-validation/lib/EmailArray';\n\nconst myEmailArray = EmailArray;\n\nEmailArrayValidation(EmailExp, myEmailArray);\n```\n\n## An array of emails for testing\n\n```js\nimport { EmailArray } from 'regular-expression-validation/lib/EmailArray';\n\nconsole.info(`An array of emails:\\n${EmailArray}`);\n```\n\n## Getting Started with development\n\n\u003e These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.\n\n### Prerequisites\n\n#### [VS Code](https://code.visualstudio.com/) is a must-have for this project\n\nSome extentions for VS Code are needed to fully utilise the config files.\n\n* Prettier\n* Eslint\n* Stylelint\n\nInstall them from the 'Extensions' tab or use the code quick open (`CTRL+P`) and run these commands:\n\n```bash\next install esbenp.prettier-vscode\next install shinnn.stylelint\next install dbaeumer.vscode-eslint\n```\n\nThe above list will get updated and separated into a needed and a practical extensions lists. For now, my entire settings file - including styling - is in the .vscode folder and would give an idea on what extensions to install if anything doesn't seem right.\n\n#### This project is developed in TypeScript, make sure your environment supports this.\n\n### Installing\n\n\u003e A step by step series of examples that tell you have to do to get a development env running\n\nThis codebase is managed with [yarn](https://yarnpkg.com/en/docs/install), npm can be used but is **not** tested.\n\nClone the repo:\n\n```bash\ngit clone git@github.com:MathiasKandelborg/Regular-Expressions.git\n```\n\nWith HTTPS:\n\n```bash\ngit clone https://github.com/MathiasKandelborg/Regular-Expressions.git\n```\n\nGo into the directory and install dependencies:\n\n```bash\ncd ./Regular-Expressions\nyarn\n```\n\nYou might have to re-compile the ts files to avoid errors:\n\n```bash\ntsc\n```\n\nEnd with an example of getting some data out of the system or using it for a little demo\n\nRun the development server, `localhost:1234` becomes available with HmR\n\n```bash\nyarn start\n```\n\nTo run the [storybook](https://storybook.js.org) for the visual part of validation:\n\n* **Note that the typings dir have to exist before running `yarn storybook`, otherwise the imports from the compiled output files will be wrong**\n\n```bash\nyarn storybook\n```\n\n## Running the tests\n\nThere aren't any tests yet. I'm not sure if any ever will be made.\n\nThis is a project made for playing with TS and i don't see much reason in adding tests when the project is so small. If the project grows a bit more, some tests will be added along with some kind of CI to go with it.\n\n### Coding style tests\n\nThese will be added with next release version, as package.json script commands.\n\n## Deployment\n\nWell, this package doesn't belong on a webser on its own, does it?😉\n\nThat being said, this part will be updated with instructions on running the storybook build command _and_ on how to publish this code as a npm module. If the project grows i might add gh-pages, Heroku or something like that.\n\n## Built With\n\n* [TypeScript](http://www.typescriptlang.org/) - Programming language (superset of JS) + build tool\n* [Prettier](https://prettier.io/) - Code formatter\n* [Yarn](https://yarnpkg.com/en/) - Dependency Management\n* [Storybook](https://storybook.js.org) - Used to create interactive 'stories' based on code.\n* [Parcel](https://parceljs.org/) - Development server and possible build tool\n\n## Contributing\n\nThere's not a custom file yet, until then;\n\nPlease read [the boilerplate CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/MathiasKandelborg/Regular-Expressions/tags).\n\n## Authors\n\n* **Mathias Wøbbe** - _Initial work_ - [MathiasKandelborg](https://github.com/MathiasKandelborg)\n\nSee also the list of [contributors](https://github.com/MathiasKandelborg/Regular-Expressions/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\nGenerally, i won't do anything if you use my code. I do strongly recommend to test it thoroughly if you're going to use it in production.\n\n## Acknowledgments\n\n* [PurpleBooth](https://gist.github.com/PurpleBooth) - README.md and CONTRIBUTIONS.md templates\n* [Kriasoft and all the people at RSK](https://github.com/kriasoft/react-starter-kit) - I learned a lot about configuration from using this repo. My config files mostly look like theirs because of all the practices I've taken with me.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathiaskandelborg%2Fregular-expressions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathiaskandelborg%2Fregular-expressions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathiaskandelborg%2Fregular-expressions/lists"}