{"id":40703774,"url":"https://github.com/sourcevault/flyd-group-within","last_synced_at":"2026-01-21T12:08:23.725Z","repository":{"id":57239292,"uuid":"141498040","full_name":"sourcevault/flyd-group-within","owner":"sourcevault","description":"buffer flyd stream values within x millisecond","archived":false,"fork":false,"pushed_at":"2018-07-27T00:45:03.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2026-01-18T14:19:20.045Z","etag":null,"topics":["flyd","functional-programming","livescript","reactive"],"latest_commit_sha":null,"homepage":"","language":"LiveScript","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/sourcevault.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-18T22:54:19.000Z","updated_at":"2018-07-27T00:44:21.000Z","dependencies_parsed_at":"2022-08-29T22:22:25.280Z","dependency_job_id":null,"html_url":"https://github.com/sourcevault/flyd-group-within","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sourcevault/flyd-group-within","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcevault%2Fflyd-group-within","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcevault%2Fflyd-group-within/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcevault%2Fflyd-group-within/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcevault%2Fflyd-group-within/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcevault","download_url":"https://codeload.github.com/sourcevault/flyd-group-within/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcevault%2Fflyd-group-within/sbom","scorecard":{"id":839475,"data":{"date":"2025-08-11","repo":{"name":"github.com/sourcevault/flyd-group-within","commit":"96119aca6729daa3700c81130934d0b2047f39f6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/11 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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENCE:0","Info: FSF or OSI recognized license: MIT License: LICENCE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'dev'"],"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-23T20:05:58.726Z","repository_id":57239292,"created_at":"2025-08-23T20:05:58.726Z","updated_at":"2025-08-23T20:05:58.726Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28632781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["flyd","functional-programming","livescript","reactive"],"created_at":"2026-01-21T12:08:22.791Z","updated_at":"2026-01-21T12:08:23.720Z","avatar_url":"https://github.com/sourcevault.png","language":"LiveScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  ```flyd-group-within```\n\n\n[![Build Status](https://travis-ci.org/sourcevault/flyd-group-within.svg?branch=dev)](https://travis-ci.org/sourcevault/flyd-group-within)\n\n```\n                                     500 ms        500 ms\n(S = start, E = End) Timer          S        E    S       E\n                                    |        |    |       |     \nupstream: (ticks represent 100ms) [-:1-2-3---:----:5-6----:-----]\ngroupWithin(500,stream):          [----------.------------.-----]\ndownstream:                                  [1,2,3]      [5,6]\n```\n\n*install..*\n\n```\nnpm install flyd-group-within\nnpm install sourcevault/flyd-group-within#dist \n```\n\n\n\n*simple example ..*\n\n```js\n\nvar groupWithin = require (\"flyd-group-within\") \n\nvar send = flyd.stream()\n\nsetTimeout (function(){send(1)},100)\nsetTimeout (function(){send(2},200)\nsetTimeout (function(){send(3)},300)\nsetTimeout (function(){send(4)},1000)\nsetTimeout (function(){send(5)},1100)\n\ngroupWithin(500,send)\n.map function (x){\n   console.log(x) \n}\n// [1,2,3]\n// [4,5]\n\n```\n\n### Why ? ..\n\n**Lower Bound Buffering**\n\n- Lets say you are sendind data to a server over HTTP. \n\n- You kown the *lower bound* overhead to physically send a packet and process the date is 200 ms.\n\n- you have a `send` function that can be used to send the data.\n\n- If the `send` function is called every *\u003c 200ms*, by definition there will be backpressure which if left unresolved will cause the **recieving** server to either run of memory, be unresponsive or in the worst case crash.\n\n- A simple protective measure is to multiplex multiple `send` operation into a single packet minimizing the handshake overhead - it's the same principal of using trains and buses to reduce road traffic.\n\nAny type of `IO` where there is an constant overhead of doing the `IO` itself can find this type of buffering useful. There is another option that involves grouping *n* `send` calls, however that type of design provides no garantee regarding maxmimum wait time for the buffered `send` to be dispatched.\n\n\n`setTimeout` also does not give a hard garantee regarding dispatch time - you can observe it when `send` operations are queud in the timeout boundaries of `flyd-group-within`, but that is besides the point since no system that does cooperative concurrency will give you that anyway. Just make sure your callbacks in the main eventloops is not blocking or running a long loop.\n\n\n**GUI IO Time Slicing**\n\n\nDouble mouse click is a good example of this application, buffer *all* mouse clicks in a 200ms windows, if there are 2 mouse clicks within a 200ms window, it becomes a double click, 3 mouse click becomes a triple click, so on and so on . . \n\nI am sure it can be used in other ways that others are better cable of finding out than me, if you would like to add your usecase do not hesitate to submit a pull request.\n\n## LICENCE\n\nCode and documentation is released under MIT Licence, see [LICENSE](https://github.com/sourcevault/flyd-group-within/blob/dist/LICENCE) for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcevault%2Fflyd-group-within","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcevault%2Fflyd-group-within","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcevault%2Fflyd-group-within/lists"}