{"id":15792748,"url":"https://github.com/nfour/lutils-merge","last_synced_at":"2026-07-03T07:33:21.297Z","repository":{"id":143888139,"uuid":"52188698","full_name":"nfour/lutils-merge","owner":"nfour","description":"Merge javascript objects recursively","archived":false,"fork":false,"pushed_at":"2017-01-10T10:28:18.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-24T06:28:19.328Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/nfour.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-02-21T03:24:04.000Z","updated_at":"2016-02-21T04:57:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"f24c65aa-78b7-4dde-a330-89deb338fc97","html_url":"https://github.com/nfour/lutils-merge","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"be95719f3569aa49b22d1f55adf647e579cd3edd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nfour/lutils-merge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfour%2Flutils-merge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfour%2Flutils-merge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfour%2Flutils-merge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfour%2Flutils-merge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfour","download_url":"https://codeload.github.com/nfour/lutils-merge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfour%2Flutils-merge/sbom","scorecard":{"id":682643,"data":{"date":"2025-08-11","repo":{"name":"github.com/nfour/lutils-merge","commit":"be95719f3569aa49b22d1f55adf647e579cd3edd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T23:41:20.110Z","repository_id":143888139,"created_at":"2025-08-21T23:41:20.110Z","updated_at":"2025-08-21T23:41:20.110Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35077507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"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":"2024-10-04T23:03:42.080Z","updated_at":"2026-07-03T07:33:21.281Z","avatar_url":"https://github.com/nfour.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# merge `lutils-merge`\nMerge javascript objects recursively.\n\n`npm install lutils-merge`\n\n## API\n\n`merge`, `merge.white`, `merge.black` supports these patterns:\n```js\nmerge(obj1, obj2, obj3, ...)\nmerge([obj1, obj2, obj3, ...], options)\nmerge([obj1, obj2, obj3, ...], ({ key }) =\u003e key !== 'keyIReallyDontWant' )\nmerge([obj1, obj2, obj3, ...], options, ({ key }) =\u003e key !== 'keyIReallyDontWant' )\n```\n\n### `merge([target], [object], [...[object]])`\nMerges all objects into first object.\n\n```js\nconst obj1 = { a: 1, b: { c: 1 }, e: 3 }\nconst obj2 = { a: 2, b: { d: 2 } }\nconst obj3 = { e: () =\u003e {} }\n\n// Merges objects obj2 then obj3 into obj1\nmerge(obj1, obj2, obj3)\n/*\n\t{\n\t\ta: 2,\n\t\tb: { c: 1, d: 2 },\n\t\te: () =\u003e {}\n\t}\n*/\n\n// Use options to customize merge behaviour.\n// The first argument is an array of objects,\n// and the second is the options object.\nmerge([\n\t{ a: { c: 1 } },\n\t{\n\t\ta: { b: 2 },\n\t\td: 1\n\t}\n], { depth: 1 })\n/*\n\t{\n\t\ta: { b: 2 },\n\t\td: 1\n\t}\n*/\n```\n\n### `merge.white()`\nMerges all objects into first object only if there **is** a key match.\n\n```js\nmerge.white(\n\t{ a: 1 },\n\t{\n\t\ta: 2,\n\t\tb: 2\n\t}\n)\n/*\n\t{ a: 2 }\n*/\n```\n\n### `merge.black()`\nMerges all objects into first object only if there **isn't** a key match.\n\n```js\nmerge.black(\n\t{ a: 1 },\n\t{ a: 2, b: 2 }\n)\n/*\n\t{ a: 1, b: 2 }\n*/\n```\n\n## Advanced usage\n\n### Options\n```js\n{\n\t// Decremented with each recursion for each nested object, halting the merge at 0\n\tdepth: 8,\n\n\t// Determines whether recursing will occur. When this type matches, it will be iterated over.\n\ttypes: { object: true, array: true }\n\ttypes: [ \"object\", \"array\" ] // Can also be an array of type strings\n\n\t// See \"Test functions\" below\n\ttest: function(params) {}\n}\n```\n\n### Test Functions\nWhen merging, a test function can be specified in two ways:\n\n```js\nmerge([obj1, obj2], () =\u003e {})\nmerge([obj1, obj2], { test: () =\u003e {} })\n```\n\nThe test function is supplied paramaters for each iteration through the merge.\n```js\nmerge([obj1, obj2], (params) =\u003e {\n\tparams.iterated // The object being iterated over\n\tparams.key // The key being iterated over in `interated`\n\tparams.obj1 // The object being mutated\n\tparams.obj2 // The object supplying mutations\n\tparams.depth // Current depth\n\tparams.options // Initially supplied/generated options\n\tparams.recursing // When `true`, this function determines whether to recurse down another level\n\tparams.assigning // When `true`, this function determines whether a value will be assigned to `obj1`\n\n\t// `recursing` and `assigning` are mutally exclusive\n})\n\n```\n\nFor example; `merge.white` is defined with this test function:\n```js\nfunction(params) {\n\tif ( params.recursing ) return true\n\n\treturn params.key in params.obj2\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfour%2Flutils-merge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfour%2Flutils-merge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfour%2Flutils-merge/lists"}