{"id":38900718,"url":"https://github.com/abradley2/cycle-effects","last_synced_at":"2026-01-17T15:03:03.140Z","repository":{"id":57094214,"uuid":"163544230","full_name":"abradley2/cycle-effects","owner":"abradley2","description":"Catch-all effects driver for Cycle inspired by redux-loop","archived":false,"fork":false,"pushed_at":"2019-01-20T16:37:23.000Z","size":121,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T20:57:42.054Z","etag":null,"topics":["cycle","cyclejs","redux-loop","typescript"],"latest_commit_sha":null,"homepage":"","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/abradley2.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}},"created_at":"2018-12-29T22:08:17.000Z","updated_at":"2023-03-23T14:02:58.000Z","dependencies_parsed_at":"2022-08-22T17:30:08.587Z","dependency_job_id":null,"html_url":"https://github.com/abradley2/cycle-effects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abradley2/cycle-effects","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abradley2%2Fcycle-effects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abradley2%2Fcycle-effects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abradley2%2Fcycle-effects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abradley2%2Fcycle-effects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abradley2","download_url":"https://codeload.github.com/abradley2/cycle-effects/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abradley2%2Fcycle-effects/sbom","scorecard":{"id":161510,"data":{"date":"2025-08-11","repo":{"name":"github.com/abradley2/cycle-effects","commit":"9d8da99b540c1a99cb2c7c480e5c99c29f708c2d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/14 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":"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":"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":"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"}}]},"last_synced_at":"2025-08-16T13:35:46.558Z","repository_id":57094214,"created_at":"2025-08-16T13:35:46.558Z","updated_at":"2025-08-16T13:35:46.558Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28510928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"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":["cycle","cyclejs","redux-loop","typescript"],"created_at":"2026-01-17T15:03:02.962Z","updated_at":"2026-01-17T15:03:03.079Z","avatar_url":"https://github.com/abradley2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cycle Effects\n\n`npm install --save @abradley2/cycle-effects`\n\n### Purpose\n\nWhen using Cycle, especially on the server, there's often need for a large amount of complex\ndrivers dealing with a large amount of side effects.\n\nThis library assumes you are using `xstream` and the default `@cycle/run`. If you\nare interested in using this without another Reactive Programming library that Cycle\nsupports, please open an issue\n\n## API\n\nAs with most other Cycle drivers, the API surface area is just a source and a sink.\n\nThe types are a good guidance on what is expected. See the Example Usage section for\na full, in-depth guide.\n\n```\ndeclare module '@abradley2/cycle-effects' {\n  export type EffectSource\u003cA\u003e = (tag: string | symbol) =\u003e xstream\u003c{\n    value: A;\n    error: Error;\n  }\u003e\n\n  export type EffectSink\u003cA\u003e = xstream\u003c{\n    run: (args: any) =\u003e Promise\u003cA\u003e;\n    args: any;\n    tag: string | symbol;\n  }\u003e\n}\n```\n\n### But isn't this running effects where we should be pure??\n\nActually, no. Similar to [Redux Loop](https://github.com/redux-loop/redux-loop) we are\nonly returning a side-effect causing function _to be_ executed by the runtime. This is why\nwe must supply an `args` property to the effect configuration in order to pass anything\nto a function that creates side effects.\n\n## Example Usage\n\nThe following application will first run an effect to get a random\nnumber, and then run an effect that sets a timeout with a duration\nbased on that random number. Finally, that effects results in the name\n\"Tony\" being sent through the result sink.\n\n```\nconst xs = require('xstream').default\nconst createEffectsDriver = require('@abradley2/cycle-effects')\n\nfunction application({effects}) {\n\tconst randomEffect = Symbol('randomEffect')\n\tconst timeoutEffect = Symbol('timeoutEffect')\n\n\treturn {\n\t\teffects: xs.merge(\n\t\t\txs.of(\n\t\t\t\t{\n\t\t\t\t\trun: () =\u003e new Promise(resolve =\u003e resolve(Math.random())),\n\t\t\t\t\ttag: randomEffect\n\t\t\t\t}\n\t\t\t),\n\t\t\teffects.select(randomEffect)\n\t\t\t\t.map(randomNum =\u003e {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trun: (name, timeoutDuration) =\u003e new Promise(resolve =\u003e\n\t\t\t\t\t\t\tsetTimeout(() =\u003e resolve(name), timeoutDuration)\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttag: timeoutEffect,\n\t\t\t\t\t\targs: ['Tony', randomNum * 1000]\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t),\n\t\tresult: effects.select(timeoutEffect)\n\t\t\t.filter(result =\u003e !result.error)\n\t\t\t.map(result =\u003e result.value)\n\t}\n}\n\nconst {sinks, run} = setup(application, { effects: createEffectsDriver() })\n\nsinks.result\n  .take(1)\n  .subscribe({\n    next: function (value) {\n      console.log(value) // \"Tony\"\n    }\n  })\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabradley2%2Fcycle-effects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabradley2%2Fcycle-effects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabradley2%2Fcycle-effects/lists"}