{"id":22382465,"url":"https://github.com/jcoreio/redux-utils-immutable","last_synced_at":"2026-05-04T06:32:41.073Z","repository":{"id":57297375,"uuid":"75792162","full_name":"jcoreio/redux-utils-immutable","owner":"jcoreio","description":"utilities for working with redux and immutable.js","archived":false,"fork":false,"pushed_at":"2024-03-06T16:58:40.000Z","size":693,"stargazers_count":0,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T19:45:38.769Z","etag":null,"topics":["immutable","immutablejs","optimization","performance","reducer","reducer-composition","redux","scalability"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/jcoreio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-12-07T02:42:15.000Z","updated_at":"2023-11-09T18:47:21.000Z","dependencies_parsed_at":"2025-03-26T19:55:27.429Z","dependency_job_id":null,"html_url":"https://github.com/jcoreio/redux-utils-immutable","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/jcoreio/redux-utils-immutable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fredux-utils-immutable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fredux-utils-immutable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fredux-utils-immutable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fredux-utils-immutable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcoreio","download_url":"https://codeload.github.com/jcoreio/redux-utils-immutable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fredux-utils-immutable/sbom","scorecard":{"id":511746,"data":{"date":"2025-08-11","repo":{"name":"github.com/jcoreio/redux-utils-immutable","commit":"4995cfca2db8dbb51d301f0d9a022563dc04b5f8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T00:43:09.508Z","repository_id":57297375,"created_at":"2025-08-20T00:43:09.508Z","updated_at":"2025-08-20T00:43:09.508Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32597404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"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":["immutable","immutablejs","optimization","performance","reducer","reducer-composition","redux","scalability"],"created_at":"2024-12-05T00:13:09.311Z","updated_at":"2026-05-04T06:32:41.056Z","avatar_url":"https://github.com/jcoreio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mindfront-redux-utils-immutable\n\n[![Build Status](https://travis-ci.org/jcoreio/redux-utils-immutable.svg?branch=master)](https://travis-ci.org/jcoreio/redux-utils-immutable)\n[![Coverage Status](https://codecov.io/gh/jcoreio/redux-utils-immutable/branch/master/graph/badge.svg)](https://codecov.io/gh/jcoreio/redux-utils-immutable)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![npm version](https://badge.fury.io/js/mindfront-redux-utils-immutable.svg)](https://badge.fury.io/js/mindfront-redux-utils-immutable)\n\n## Legacy build note\n\nIf you are building for legacy browsers with webpack or a similar bundler, make\nsure to add a rule to transpile this package to ES5.\n\n## combineReducers\n\n```es6\nimport { combineReducers } from 'mindfront-redux-utils-immutable'\n```\n\n```es6\nfunction combineReducers(\n  reducers: {[key: any]: Reducer},\n  createInitialState?: (initialValues: Object) =\u003e Immutable.Collection.Keyed | Record = Immutable.Map\n): Reducer\n```\n\nLike `combineReducers` from `redux`, except that the combined reducer operates on immutable keyed collections or\nrecords.\n\nUnlike the `combineReducers` implementation from the `redux-immutable` package, this implementation is\nhighly optimized. If multiple reducers have `actionHandlers`, they will be recombined so that all mutations for\none of those actions are done inside a single `state.withMutations` call.\n\nAs an example, let's say we have the following reducer:\n\n```js\nconst setUser = (oldUser, action) =\u003e action.newUser\nconst updateUser = (user, action) =\u003e user.merge(action.payload)\nconst incUserChangeCount = (count = 0) =\u003e count + 1\n\nconst reducer = combineReducers({\n  user: createReducer({\n    [SET_USER]: setUser,\n    [UPDATE_USER]: updateUser,\n  }),\n  userChangeCount: createReducer({\n    [SET_USER]: incUserChangeCount,\n  }),\n})\n```\n\n`combineReducers` essentially works like the following:\n\n```js\nconst reducer = createReducer({\n  [SET_USER]: (state, action) =\u003e\n    state.withMutations((state) =\u003e {\n      state.update('user', (oldUser) =\u003e setUser(oldUser, action))\n      state.update('userChangeCount', (count) =\u003e\n        incUserChangeCount(count, action)\n      )\n    }),\n  [UPDATE_USER]: (state, action) =\u003e\n    state.update('user', (user) =\u003e updateUser(user, action)),\n})\n```\n\n### Caveats\n\nDue to this optimization, unlike other `combineReducers` implementations, if you call the combined reducer with an\nempty collection, it will not set the initial values for any reducers skipped by optimization. For example:\n\n```es6\nimport { Map } from 'immutable'\nimport { createReducer } from 'mindfront-redux-utils'\nimport { combineReducers } from 'mindfront-redux-utils-immutable'\n\nconst reducer = combineReducers({\n  a: createReducer(0, {\n    a: (state) =\u003e state + 1,\n    ab: (state) =\u003e state + 1,\n  }),\n  b: createReducer(0, {\n    ab: (state) =\u003e state + 1,\n    b: (state) =\u003e state + 1,\n  }),\n})\n\nreducer(undefined, { type: 'a' }) // Map({a: 1, b: 0})\nreducer(Map(), { type: 'a' }) // Map({a: 1})\nreducer(Map(), { type: 'b' }) // Map({b: 1})\nreducer(Map(), { type: 'ab' }) // Map({a: 1, b: 1})\n```\n\nAs long as you handle missing keys everywhere in your code, this is not a problem.\n\nAnother workaround is to use `Record`s with the desired initial values in the `Record` constructor:\n\n```es6\nimport { Record } from 'immutable'\nimport { createReducer } from 'mindfront-redux-utils'\nimport { combineReducers } from 'mindfront-redux-utils-immutable'\n\nconst MyRecord = Record({ a: 0, b: 0 })\n\nconst reducer = combineReducers(\n  {\n    a: createReducer(0, {\n      a: (state) =\u003e state + 1,\n      ab: (state) =\u003e state + 1,\n    }),\n    b: createReducer(0, {\n      ab: (state) =\u003e state + 1,\n      b: (state) =\u003e state + 1,\n    }),\n  },\n  MyRecord\n)\n\nreducer(undefined, { type: 'a' }) // MyRecord({a: 1, b: 0})\nreducer(MyRecord(), { type: 'a' }) // MyRecord({a: 1, b: 0})\nreducer(MyRecord(), { type: 'b' }) // MyRecord({b: 1, b: 0})\nreducer(MyRecord(), { type: 'ab' }) // MyRecord({a: 1, b: 1})\n```\n\n## subpathReducer\n\n```es6\nimport { subpathReducer } from 'mindfront-redux-utils-immutable'\n```\n\n```es6\nfunction subpathReducer(\n  path: Array\u003cany\u003e | (action: Action) =\u003e Array\u003cany\u003e,\n  initialState?: Immutable.Collection.Keyed | Record\n): Reducer =\u003e Reducer\n```\n\nCreates a reducer that applies the decorated reducer at the given `path` within the `state`. This is basically\nequivalent to `(state = initialState, action) =\u003e state.updateIn(path, reducer)` except that if the decorated reducer\nhas `actionHandlers`, the created reducer will have corresponding `actionHandlers` so that other utils can optimize it.\n\nIf you pass a function for `path`, `subpathReducer` will get the actual path by calling `path(action)` for each\n`action`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcoreio%2Fredux-utils-immutable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcoreio%2Fredux-utils-immutable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcoreio%2Fredux-utils-immutable/lists"}