{"id":20356299,"url":"https://github.com/patrimart/rx-fsa","last_synced_at":"2026-03-02T00:31:24.079Z","repository":{"id":115598545,"uuid":"129051366","full_name":"patrimart/rx-fsa","owner":"patrimart","description":"This TypeScript library provides factories for creating fully typed FSA-compliant Actions, reducers and RxJS utility operators.","archived":false,"fork":false,"pushed_at":"2018-10-24T03:50:20.000Z","size":145,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-01T09:58:57.203Z","etag":null,"topics":["actions","angular","flux","fsa","ngrx","react","reducers","redux","rxjs"],"latest_commit_sha":null,"homepage":"","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/patrimart.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":"2018-04-11T07:17:05.000Z","updated_at":"2022-02-06T15:32:08.000Z","dependencies_parsed_at":"2023-06-10T03:30:54.100Z","dependency_job_id":null,"html_url":"https://github.com/patrimart/rx-fsa","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/patrimart/rx-fsa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrimart%2Frx-fsa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrimart%2Frx-fsa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrimart%2Frx-fsa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrimart%2Frx-fsa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrimart","download_url":"https://codeload.github.com/patrimart/rx-fsa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrimart%2Frx-fsa/sbom","scorecard":{"id":722582,"data":{"date":"2025-08-11","repo":{"name":"github.com/patrimart/rx-fsa","commit":"0cfdff4b32fa7dd894bdd32b6c461df536eb16d4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/29 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":"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":"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":"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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":"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":0,"reason":"69 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-c75v-2vq8-878f","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","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-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-f9cm-qmx5-m98h","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","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-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","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-22T11:49:04.168Z","repository_id":115598545,"created_at":"2025-08-22T11:49:04.168Z","updated_at":"2025-08-22T11:49:04.168Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29988040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T22:42:38.399Z","status":"ssl_error","status_checked_at":"2026-03-01T22:41:51.863Z","response_time":124,"last_error":"SSL_read: 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":["actions","angular","flux","fsa","ngrx","react","reducers","redux","rxjs"],"created_at":"2024-11-14T23:15:52.861Z","updated_at":"2026-03-02T00:31:23.795Z","avatar_url":"https://github.com/patrimart.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FSA Actions, Reducers, Matchers and RxJS Utils\n\nThis TypeScript library provides:\n\n- Factories for creating fully-typed FSA-compliant Actions.\n- Composable reducers and Action filters.\n- `RxJS` operators for easier async Effects set-up.\n- `@ngrx/store` lazy MemoizedSelector\n\n```ts\nexport type Meta = Readonly\u003cobject\u003e \u0026 { readonly [key: string]: any };\n\nexport interface Action\u003cP, M extends Meta = Meta\u003e {\n  readonly type: string;\n  readonly payload: P;\n  readonly meta: M;\n  readonly error: boolean;\n}\n```\n\n# Installation\n\n```\nnpm i rx-fsa\n```\n\n`/ngrx` and `/rxjs` libs are compatible with `Angular 6` and `RxJS 6`.\n\n# Usage\n\n## Basic Empty and Syncronous Actions\n\n```ts\nimport { actionCreatorFactory } from \"rx-fsa/actions\";\n\nconst counterActionFactory = actionCreatorFactory(\"COUNTER\");\nconst resetCounterFactory = counterActionFactory(\"RESET\");\nconst resetActionAction = resetCounterFactory(undefined);\n\nconst incrementCounterFactory = counterActionFactory\u003cnumber\u003e(\"INCREMENT\");\nconst incrementOneAction = incrementCounterFactory(1);\n\nconst decrementCounterFactory = counterActionFactory\u003cnumber\u003e(\"INCREMENT\");\nconst decrementAction = (count: number) =\u003e decrementCounterFactory(count);\n```\n\n## Async Action Creators\n\n```ts\ninterface State {\n  readonly count?: number;\n}\n\nconst saveCountFactory = counterActionFactory.async\u003cState, void, Error\u003e(\"SAVE\");\nconst saveCountStartedAction = saveCountFactory.started({ count: 100 });\nconst saveCountDoneAction = saveCountFactory.done({ result: 100, params: { count: 100 } });\nconst saveCountFailedAction = saveCountFactory.failed({ error: new Error(\"File not saved.\"), params: { count: 100 } });\n```\n\n---\n\n## Reducers\n\n```ts\nimport { caseFn, Re, reducerDefaultFn } from \"rx-fsa/reducers\";\n\nconst INIT_STATE: State = { count: 0 };\n\nconst resetHandler: Re\u003cState, void\u003e = state =\u003e INIT_STATE;\n\nconst incrementHandler: Re\u003cState, number\u003e = (state, add) =\u003e ({\n  count: state.count + add,\n});\n\nconst decrementHandler: Re\u003cState, number\u003e = (state, sub) =\u003e ({\n  count: state.count - sub,\n});\n\nexport const reducers = reducerDefaultFn(INIT_STATE)(\n  caseFn(incrementCounterFactory, incrementHandler),\n  caseFn(decrementCounterFactory, decrementHandler),\n  caseFn(resetCounterFactory, resetHandler),\n);\n```\n\n---\n\n## RxJS Operators\n\nThe following operators are provided under `rx-fsa/rxjs`:\n- filterConcatAsync\n- filterExhaustAsync\n- filterMergeAsync\n- filterSwitchAsync\n- filterConcat\n- filterExhaust\n- filterMerge\n- filterSwitch\n- filterActions\n\nExample with NgRx Effects:\n```ts\nimport { filterExhaustAsync } from \"rx-fsa/rxjs\";\n\n@Effect()\npublic saveCount$ = this.action$.pipe(\n    filterExhaustAsync(saveCountFactory, params =\u003e this.httpSvc.save(params)),\n);\n```\nThe above is equivalent to:\n```ts\n@Effect()\npublic saveCount$ = this.action$.pipe(\n  filter(saveCountFactory.started.match),\n  mergeMap((result: R) =\u003e this.httpSvc.save(params).pipe(\n    map(result = saveCountFactory.done({ result, params })),\n    catchError(error =\u003e saveCountFactory.failed({ error, params }),\n  ),\n);\n```\n\n---\n\n## Lazy Selector\n\nCreate a `MemoizedSelector` that will emit a store slice or, if unavailable, dispatch action(s) to set the store slice and then emit.\n\n```ts\n// selectors.ts\nimport { createSelector } from \"@ngrx/store\";\nimport { composeLazySelector, createLazySelector } from \"rx-fsa/ngrx\";\n\nconst selectFeature = (state: AppState) =\u003e state.feature;\nconst selectFeatureCount = createSelector(selectFeature, state =\u003e state.counter);\n\nexport const lazySelectFeatureCount = createLazySelector(selectFeatureCount, loadFeatureAction.started(undefined));\nexport const lazySelectCountPlusN = composeLazySelector(lazySelectFeatureCount, lazySelectN)((count, n) =\u003e count + n);\n```\n\n```ts\n// app.component.ts\nimport { lazySelectFeatureCount } from './selectors';\n\n@Component({ ... })\nclass MyAppComponent {\n  count: Observable\u003cnumber\u003e;\n\n  constructor(private store$: Store\u003cAppState\u003e) {\n    const selectFeatureCount = lazySelectFeatureCount(this.store$);\n    this.count = this.store$.pipe(selectFeatureCount());\n  }\n}\n```\n\n# API\n\nAPI Documentation is coming soon. The library is small enough to scour through in GitHub to learn more.\n\n# Credits\n\nThis library was inspired by:\n- https://github.com/aikoven/typescript-fsa\n- https://github.com/dphilipson/typescript-fsa-reducers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrimart%2Frx-fsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrimart%2Frx-fsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrimart%2Frx-fsa/lists"}