{"id":21201681,"url":"https://github.com/oleander/is_prime","last_synced_at":"2025-03-14T22:26:05.071Z","repository":{"id":1503191,"uuid":"1757774","full_name":"oleander/is_prime","owner":"oleander","description":"Is the given number a prime number?","archived":false,"fork":false,"pushed_at":"2011-05-16T21:31:18.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T14:47:38.744Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/oleander/is_prime","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oleander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-05-16T21:30:09.000Z","updated_at":"2013-09-30T21:36:53.000Z","dependencies_parsed_at":"2022-08-16T13:30:36.387Z","dependency_job_id":null,"html_url":"https://github.com/oleander/is_prime","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fis_prime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fis_prime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fis_prime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fis_prime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oleander","download_url":"https://codeload.github.com/oleander/is_prime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243654401,"owners_count":20325893,"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-20T20:10:29.509Z","updated_at":"2025-03-14T22:26:05.039Z","avatar_url":"https://github.com/oleander.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# is_prime\n\nIs the given number a prime number?\n\nFollow me on [Twitter](http://twitter.com/linusoleander) or [Github](https://github.com/oleander/) for more info and updates.\n\n## How to use\n  \n```` ruby\nrequire \"is_prime\"\n\n3.prime? # =\u003e true\n4.prime? # =\u003e false\n````\n\n## What algorithm is being used?\n\nThe implementation is just one line.\n\n```` ruby\n('1' * N) !~ /^1?$|^(11+?)\\1+$/\n````\n\nRead more about it [here](http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/).\n\n## How to install\n\n    [sudo] gem install is_prime\n\n## Requirements\n\n*is_prime* is tested in Mac OS X 10.6.6, 10.6.7 using Ruby 1.8.7, 1.9.2.\n\n## License\n\n*is_prime* is released under the *MIT license*.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleander%2Fis_prime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foleander%2Fis_prime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleander%2Fis_prime/lists"}