{"id":22871520,"url":"https://github.com/opensly/isregex","last_synced_at":"2025-03-31T11:41:05.602Z","repository":{"id":261891183,"uuid":"885647880","full_name":"opensly/isRegex","owner":"opensly","description":"Determines if a given value is a regular expression.","archived":false,"fork":false,"pushed_at":"2024-11-09T03:14:19.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-06T17:11:41.001Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/opensly.png","metadata":{"files":{"readme":"README.md","changelog":null,"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},"funding":{"custom":["https://www.paypal.com/paypalme/LakshmikanthV"]}},"created_at":"2024-11-09T02:58:32.000Z","updated_at":"2024-11-09T03:15:06.000Z","dependencies_parsed_at":"2024-11-09T03:31:09.718Z","dependency_job_id":"e4aba974-94b1-4030-a400-7615dd7c74a8","html_url":"https://github.com/opensly/isRegex","commit_stats":null,"previous_names":["opensly/isregex"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2FisRegex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2FisRegex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2FisRegex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2FisRegex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensly","download_url":"https://codeload.github.com/opensly/isRegex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246465216,"owners_count":20781914,"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-12-13T13:19:38.221Z","updated_at":"2025-03-31T11:41:05.580Z","avatar_url":"https://github.com/opensly.png","language":"JavaScript","funding_links":["https://www.paypal.com/paypalme/LakshmikanthV","https://www.paypal.me/LakshmikanthV"],"categories":[],"sub_categories":[],"readme":"# isRegex\n\nDetermines if a given value is a regular expression.\n\n## Usage Guide\n\nSome usage examples for the `isRegex` function:\n\n#### Basic Type Checking\n\n```\nimport isRegex from './isRegex';\n\nconst pattern = /abc/;\nconsole.log(isRegex(pattern)); // true\n\nconst nonPattern = 'abc';\nconsole.log(isRegex(nonPattern)); // false\n```\n\n#### Validation before using regex methods\n```\nconst maybePattern = '/[a-z]/';\n\nif (isRegex(maybePattern)) {\n    console.log(maybePattern.test('hello')); // Executes safely\n} else {\n    console.log('Not a valid regex pattern');\n}\n```\n\n#### Filtering an Array\n\n```\nconst items = [/test/, 'hello', /abc/, 123];\nconst regexItems = items.filter(isRegex);\nconsole.log(regexItems); // [/test/, /abc/]\n```\n\n## Support\nYour support inspires \u0026 encourage us more. If you are interested to make a donation to us, please click the below PayPal button.\n\n[![PayPal.me](https://img.shields.io/badge/paypal-donate-119fde.svg)](https://www.paypal.me/LakshmikanthV)\n\n## License\nThis project is licensed under the MIT License.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensly%2Fisregex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensly%2Fisregex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensly%2Fisregex/lists"}