{"id":19858679,"url":"https://github.com/weavejester/meta-merge","last_synced_at":"2025-05-02T02:31:08.812Z","repository":{"id":21505413,"uuid":"24824412","full_name":"weavejester/meta-merge","owner":"weavejester","description":"A standalone implementation of Leiningen's meta-merge function","archived":false,"fork":false,"pushed_at":"2023-11-13T14:49:33.000Z","size":13,"stargazers_count":109,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-22T09:44:50.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","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/weavejester.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-10-05T19:42:27.000Z","updated_at":"2025-02-18T07:32:16.000Z","dependencies_parsed_at":"2024-06-19T04:12:38.599Z","dependency_job_id":null,"html_url":"https://github.com/weavejester/meta-merge","commit_stats":{"total_commits":17,"total_committers":3,"mean_commits":5.666666666666667,"dds":"0.11764705882352944","last_synced_commit":"c968c38baccd4219fe0ba592d89af37ea8e426bf"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fmeta-merge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fmeta-merge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fmeta-merge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fmeta-merge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weavejester","download_url":"https://codeload.github.com/weavejester/meta-merge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251972474,"owners_count":21673612,"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-12T14:24:14.295Z","updated_at":"2025-05-02T02:31:08.475Z","avatar_url":"https://github.com/weavejester.png","language":"Clojure","funding_links":[],"categories":["Clojure"],"sub_categories":[],"readme":"# Meta-Merge\n\n[![Build Status](https://travis-ci.org/weavejester/meta-merge.svg?branch=master)](https://travis-ci.org/weavejester/meta-merge)\n\nThis is a standalone implementation of the [Leiningen][] `meta-merge`\nfunction. It's particularly useful for merging configuration maps.\n\n[Leiningen]: https://github.com/technomancy/leiningen\n\n## Installation\n\nTo install, add the following to your project `:dependencies`:\n\n    [meta-merge \"1.0.0\"]\n\n## Usage\n\nThe `meta-merge` function recursively merges two data structures.\n\n```clojure\n(require '[meta-merge.core :refer [meta-merge]])\n\n(meta-merge {:a [:b :c]} {:a [:d]})\n=\u003e {:a [:b :c :d]}\n```\n\n## Metadata\n\nMetadata hints can be provided to override the default behavior:\n\n### Prepend\n\nWhen `meta-merge` is called with a hash-map that has `^:prepend` on it, the\nfunction  will take the values on the right and prepend them to the set on the\nleft (the default would **append** them as you can see above). You can see this\nbelow.\n\n```clojure\n(meta-merge {:a [:b :c]} {:a ^:prepend [:d]})\n=\u003e {:a [:d :b :c]}\n```\n\n### Replace\n\nWhen `meta-merge` is called with a hash-map that has `^:replace` on it, the\nfunction will take the values on the right and completely replace the ones on\nthe left. You can see this below:\n\n```clojure\n(meta-merge {:a [:b :c]} {:a ^:replace [:d]})\n=\u003e {:a [:d]}\n```\n\nWith replace the map to the right takes precedence.\n\n### Displace\n\nWhen `meta-merge` is called with a hash-map that has `^:displace` on it, the\nfunction will take the values on the right, only if there are no values on the\nleft. You can see this below:\n\n```clojure\n(meta-merge {:a [:b :c]} {:a ^:displace [:d]})\n=\u003e {:a [:b :c]}\n```\n\nWith displace the map to the left takes precedence. This makes displace a\ngood solution for default values.\n\n## License\n\nCopyright © 2016 Phil Hagelberg, James Reeves and all the Leiningen\n[contributors][].\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n\n[contributors]: https://github.com/technomancy/leiningen/graphs/contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweavejester%2Fmeta-merge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweavejester%2Fmeta-merge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweavejester%2Fmeta-merge/lists"}