{"id":19586391,"url":"https://github.com/epaew/deep_compact.rb","last_synced_at":"2025-07-01T23:02:28.019Z","repository":{"id":43369382,"uuid":"356313401","full_name":"epaew/deep_compact.rb","owner":"epaew","description":"Define `Array#deep_compact` and `Hash#deep_compact` which apply `#compact` recursively.","archived":false,"fork":false,"pushed_at":"2024-06-15T05:50:46.000Z","size":37,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-22T04:49:22.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/epaew.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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-04-09T15:16:42.000Z","updated_at":"2024-02-29T14:20:20.000Z","dependencies_parsed_at":"2025-04-27T12:32:21.915Z","dependency_job_id":"8758fa4d-13cb-44d1-bd8a-d8cf7a523a20","html_url":"https://github.com/epaew/deep_compact.rb","commit_stats":{"total_commits":24,"total_committers":3,"mean_commits":8.0,"dds":"0.20833333333333337","last_synced_commit":"8315df23bf3a8f701e5a0e8463622503f8bc0565"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/epaew/deep_compact.rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epaew%2Fdeep_compact.rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epaew%2Fdeep_compact.rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epaew%2Fdeep_compact.rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epaew%2Fdeep_compact.rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epaew","download_url":"https://codeload.github.com/epaew/deep_compact.rb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epaew%2Fdeep_compact.rb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261803659,"owners_count":23211988,"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-11T07:59:36.612Z","updated_at":"2025-07-01T23:02:27.843Z","avatar_url":"https://github.com/epaew.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deep_compact.rb\n[![Gem Version](https://badge.fury.io/rb/deep_compact.svg)](https://badge.fury.io/rb/deep_compact)\n[![Build Status](https://github.com/epaew/deep_compact.rb/actions/workflows/rspec.yaml/badge.svg?branch=master\u0026event=push)](https://github.com/epaew/deep_compact.rb/actions/workflows/rspec.yaml)\n[![Maintainability](https://api.codeclimate.com/v1/badges/6d9d408e778dd4e24d2b/maintainability)](https://codeclimate.com/github/epaew/deep_compact.rb/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/6d9d408e778dd4e24d2b/test_coverage)](https://codeclimate.com/github/epaew/deep_compact.rb/test_coverage)\n\nDefine `Array#deep_compact` and `Hash#deep_compact` which apply `#compact` recursively.\n\n## Requirements\nRuby: 2.6 or higher\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'deep_compact'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install deep_compact\n\n## Usage\n```ruby\nrequire 'deep_compact'\n\nusing DeepCompact\n\narray = [nil, :a, { a: :a, nil: nil }]\npp array.deep_compact #=\u003e [:a, {:a=\u003e:a}]\n\nhash = { a: :a, nil: nil, array: [nil, :a], hash: { a: :a, nil: nil } }\npp hash.deep_compact #=\u003e {:a=\u003e:a, :array=\u003e[:a], :hash=\u003e{:a=\u003e:a}}\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/epaew/deep_compact.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepaew%2Fdeep_compact.rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepaew%2Fdeep_compact.rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepaew%2Fdeep_compact.rb/lists"}