{"id":29272135,"url":"https://github.com/acook/enumerous","last_synced_at":"2025-10-24T17:36:26.241Z","repository":{"id":137792133,"uuid":"338768210","full_name":"acook/enumerous","owner":"acook","description":"Handy functionality for your Crystal Arrays and Enumerables!","archived":false,"fork":false,"pushed_at":"2021-02-17T03:26:34.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-05T00:11:35.899Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acook.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,"zenodo":null}},"created_at":"2021-02-14T09:20:04.000Z","updated_at":"2021-02-17T03:26:36.000Z","dependencies_parsed_at":"2023-05-22T14:00:23.645Z","dependency_job_id":null,"html_url":"https://github.com/acook/enumerous","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/acook/enumerous","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acook%2Fenumerous","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acook%2Fenumerous/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acook%2Fenumerous/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acook%2Fenumerous/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acook","download_url":"https://codeload.github.com/acook/enumerous/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acook%2Fenumerous/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267442456,"owners_count":24087802,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-07-05T00:10:35.582Z","updated_at":"2025-10-24T17:36:20.899Z","avatar_url":"https://github.com/acook.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Enumerous\n\nHandy functionality for your Arrays and Enumerables!\n\n[![GitHub release](https://img.shields.io/github/release/acook/enumerous.svg?style=for-the-badge)](https://github.com/acook/enumerous/releases)\n[![CircleCI](https://img.shields.io/circleci/build/github/acook/enumerous?style=for-the-badge)](https://app.circleci.com/pipelines/github/acook/enumerous)\n\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     enumerous:\n       github: acook/enumerous\n   ```\n\n2. Run `shards install`\n\n## Usage\n\n### Erray Custom Array Type\n\nAn Erray is a strict superset of the core Array functionality without modifying any builtin classes. It works great with normal Arrays!\n\n```crystal\nrequire \"enumerous/erray\"\n```\n\n```crystal\nhas_different_elements = Erray{1,2}.similar [2,3]       #=\u003e false\ncontains_same_elements = Erray{1,2}.similar [2,1]       #=\u003e true\n\nextra, missing = Erray{1,2}.diff [2,3]                  #=\u003e {[3],[1]}\n\nindex_of_first_difference = Erray{1,2}.diff_index [1,3] #=\u003e 1\n\n{1,2}.find_and_map {|element| element \u003e 1 \u0026\u0026 element.to_s }              #=\u003e \"2\"\n```\n\nIf you do not want Erray in the global namespace just pass `-Dno_erray_alias` to the compiler and you can still access it from `Enumerous::Erray`.\n\n### Optional Core Extension\n\n```crystal\nrequire \"enumerous/coreext\"\n```\n\n```crystal\nhas_different_elements = [1,2].similar [2,3]       #=\u003e false\ncontains_same_elements = [1,2].similar [2,1]       #=\u003e true\n\nextra, missing = [1,2].diff [2,3]                  #=\u003e {[3],[1]}\n\nindex_of_first_difference = [1,2].diff_index [1,3] #=\u003e 1\n\n[1,2].find_and_map {|element| element \u003e 1 \u0026\u0026 element.to_s }              #=\u003e \"2\"\n{a: 1, b: 2}.find_and_map {|key, value| value \u003e 1 \u0026\u0026 \"#{key}:#{value}\" } #=\u003e \"b:2\"\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/acook/enumerous/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Anthony Cook](https://github.com/acook) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facook%2Fenumerous","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facook%2Fenumerous","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facook%2Fenumerous/lists"}