{"id":22031973,"url":"https://github.com/datencia/ngrx-store-reset","last_synced_at":"2026-02-18T18:31:23.044Z","repository":{"id":38763216,"uuid":"184884822","full_name":"datencia/ngrx-store-reset","owner":"datencia","description":"@ngrx/store meta reducer to reset the state.","archived":false,"fork":false,"pushed_at":"2023-05-01T01:27:22.000Z","size":203,"stargazers_count":1,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T10:54:35.075Z","etag":null,"topics":["angular","ngrx","ngrx-store","reducer","redux","reset"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/datencia.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}},"created_at":"2019-05-04T11:12:19.000Z","updated_at":"2023-03-01T23:54:07.000Z","dependencies_parsed_at":"2024-11-30T08:38:21.438Z","dependency_job_id":null,"html_url":"https://github.com/datencia/ngrx-store-reset","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.2777777777777778,"last_synced_commit":"6766505c53ece0720aed1b1784898cc3e9cbd8fb"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/datencia/ngrx-store-reset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datencia%2Fngrx-store-reset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datencia%2Fngrx-store-reset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datencia%2Fngrx-store-reset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datencia%2Fngrx-store-reset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datencia","download_url":"https://codeload.github.com/datencia/ngrx-store-reset/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datencia%2Fngrx-store-reset/sbom","scorecard":{"id":324975,"data":{"date":"2025-08-11","repo":{"name":"github.com/datencia/ngrx-store-reset","commit":"6766505c53ece0720aed1b1784898cc3e9cbd8fb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"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":"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":"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":"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":"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:0","Info: FSF or OSI recognized license: MIT License: LICENSE: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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"14 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-c75v-2vq8-878f","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"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-18T02:12:52.832Z","repository_id":38763216,"created_at":"2025-08-18T02:12:52.832Z","updated_at":"2025-08-18T02:12:52.832Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29589454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T16:55:40.614Z","status":"ssl_error","status_checked_at":"2026-02-18T16:55:37.558Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","ngrx","ngrx-store","reducer","redux","reset"],"created_at":"2024-11-30T08:24:41.795Z","updated_at":"2026-02-18T18:31:23.024Z","avatar_url":"https://github.com/datencia.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ngrx-store-reset\n\n[![npm version](https://badge.fury.io/js/ngrx-store-reset.svg)](https://badge.fury.io/js/ngrx-store-reset)\n\n@ngrx/store meta reducer to reset the state.\n\n## Installation\n\n```sh\nnpm i --save ngrx-store-reset\n```\n\nOR\n\n```sh\nyarn add ngrx-store-reset\n```\n\n## Usage\n\n### 1. Setup\n\n```ts\nimport { StoreModule, MetaReducer, ActionReducerMap } from '@ngrx/store';\nimport { storeReset } from 'ngrx-store-reset';\n\nimport { ActionTypes } from './actions';\n\nexport interface State {\n  // reducer interfaces\n}\n\nexport const reducers: ActionReducerMap\u003cState\u003e = {\n  // reducers\n}\n\n// Pass your action type (the one you'd like to reset the state) to the metareducer\nexport function storeResetMetaReducer(reducer: ActionReducer\u003cState\u003e): ActionReducer\u003cState\u003e {\n  return storeReset({ action: ActionTypes.Logout })(reducer);\n}\n\nexport const metaReducers: MetaReducer\u003cState\u003e[] = [ storeResetMetaReducer ];\n\n@NgModule({\n  imports: [\n    StoreModule.forRoot(reducers, { metaReducers }),\n  ]\n})\nexport class AppModule {}\n```\n\n#### Options\n\n- `action`: specify the action to listen for to reset the state (defaults to `RESET_STORE`).\n\n### 2. Resetting the state\n\nJust dispatch your action, the metareducer will do the job.\n\n```ts\nimport { Component } from '@angular/core';\nimport { Store } from '@ngrx/store';\n\nimport { Logout } from './actions';\n\n@Component({\n    selector: 'app-my-component',\n    templateUrl: './my-component.component.html',\n    styleUrls: ['./my-component.component.scss']\n})\nexport class MyComponentComponent {\n    constructor(private store: Store\u003cState\u003e) {}\n\n    logout() {\n        this.store.dispatch(new Logout());\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatencia%2Fngrx-store-reset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatencia%2Fngrx-store-reset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatencia%2Fngrx-store-reset/lists"}