{"id":13649260,"url":"https://github.com/jamiemccrindle/axax","last_synced_at":"2026-02-01T01:39:04.063Z","repository":{"id":32640848,"uuid":"138423847","full_name":"jamiemccrindle/axax","owner":"jamiemccrindle","description":"Async Iterator Extensions for JavaScript e.g. map, reduce, filter, flatMap, etc.","archived":false,"fork":false,"pushed_at":"2022-11-13T16:05:47.000Z","size":691,"stargazers_count":506,"open_issues_count":10,"forks_count":22,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-11-14T04:10:17.277Z","etag":null,"topics":[],"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/jamiemccrindle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-23T18:13:36.000Z","updated_at":"2025-08-18T14:39:35.000Z","dependencies_parsed_at":"2023-01-14T22:00:33.867Z","dependency_job_id":null,"html_url":"https://github.com/jamiemccrindle/axax","commit_stats":null,"previous_names":["jamiemccrindle/aix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jamiemccrindle/axax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiemccrindle%2Faxax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiemccrindle%2Faxax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiemccrindle%2Faxax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiemccrindle%2Faxax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamiemccrindle","download_url":"https://codeload.github.com/jamiemccrindle/axax/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiemccrindle%2Faxax/sbom","scorecard":{"id":504587,"data":{"date":"2025-08-11","repo":{"name":"github.com/jamiemccrindle/axax","commit":"0020e8f55d79fa61a26d8266aeeccf2546a3d766"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/jamiemccrindle/axax/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/jamiemccrindle/axax/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/jamiemccrindle/axax/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/jamiemccrindle/axax/codeql-analysis.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"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":"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":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 20 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":"35 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","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-gxpj-cx7g-858c","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-qqgx-2p2h-9c37","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-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","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-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-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-19T22:58:02.272Z","repository_id":32640848,"created_at":"2025-08-19T22:58:02.273Z","updated_at":"2025-08-19T22:58:02.273Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28963914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T01:25:30.373Z","status":"ssl_error","status_checked_at":"2026-02-01T01:25:29.809Z","response_time":128,"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":[],"created_at":"2024-08-02T01:04:53.742Z","updated_at":"2026-02-01T01:39:04.030Z","avatar_url":"https://github.com/jamiemccrindle.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Helper Components"],"sub_categories":[],"readme":"# Async Iterator Extensions\n\nA library of async iterator extensions for JavaScript including ```map```, ```reduce```,\n```filter```, ```flatMap```, ```pipe``` and [more](https://github.com/jamiemccrindle/axax/blob/master/docs/API.md#functions).\n\n\n# Installation\n\n```bash\nnpm install axax # or yarn add axax\n```\n\n# Why Axax?\n\nAsync iterators are a useful way to handle asynchronous streams. This library adds a number\nof utility methods similar to those found in lodash, underscore, Ramda or RxJs.\n\n## es5 vs esnext\n\nAxax contains both transpiled es5 code as well as esnext code, the difference being that\nesnext uses the native ```for await``` syntax. In nodejs 10.x that gives approximately a 40% speedup.\n\n```javascript\n// use es5 if you want to support more browsers\nimport { map } from \"axax/es5/map\"; \n\n// use esnext if you're only using node 10.x or supporting very new browsers\nimport { map } from \"axax/esnext/map\"; \n```\n\n# Reference Documentation\n\n* [API Reference](https://github.com/jamiemccrindle/axax/blob/master/docs/API.md)\n\n# Examples\n\n## fromEvent\n\n```fromEvent``` turns DOM events into an iterable.\n\n```javascript\nimport { fromEvent } from \"axax/es5/fromEvent\";\n\nconst clicks = fromEvent(document, 'click');\n\nfor await (const click of clicks) {\n    console.log('a button was clicked');\n}\n```\n\n## pipe, map, filter, fromLineReader\n\n```fromLineReader``` turns a NodeJS LineReader into an async iterable.\nThe example below prints the lines from a file in upper case after\nfiltering out the empty ones.\n\n```javascript\n// create the line reading async iterable\nconst lines = fromLineReader(\n    require(\"readline\").createInterface({\n        input: require(\"fs\").createReadStream(\"./data/example.txt\")\n    })\n);\n\n// create a filter that removes empty lines\nconst notEmpty = filter(line =\u003e line.length \u003e 0);\n\n// convert to uppercase\nconst toUpperCase = map(line =\u003e line.toUpperCase());\n\n// go through each of the non empty lines\nfor await (const line of pipe(notEmpty, toUpperCase)(lines)) {\n    console.log(line);\n}\n```\n\n## Subject\n\n```Subject``` makes it easy to turn stream of events into an iterable. The code below\nis essentially how ```fromEvent``` was implemented.\n\n```javascript\nimport { Subject } from \"axax/es5/subject\";\n\nconst subject = new Subject();\n\n// set up a callback that calls value on the subject\nconst callback = value =\u003e subject.onNext(value);\n\n// attach the callback to the click event\ndocument.addEventListener('click', callback);\n\n// remove the callback when / if the iterable stops\nsubject.finally(() =\u003e document.removeEventListener('click', callback));\n\n// go through all the click events\nfor await (const click of subject.iterator) {\n    console.log('a button was clicked');\n}\n```\n\n# Avoiding leaks\n\nIt's possible to have an async iterator leak if it never returns a value e.g.:\n\n```javascript\nconst subject1 = new Subject();\nconst subject2 = new Subject();\n\nasync function* neverEnds() {\n  try {\n    for await(const i of subject2.iterator) {\n      yield i;\n    }\n  } finally {\n    console.log(\"never called\")\n  }\n}\n\nasync function* run() {\n  for await(const i of merge(subject1.iterator,neverEnds())) {\n    break;\n  }\n}\n\nrun()\nsubject1.onNext(1)\n```\n\nIf you need to be able to cancel async iterators that may never return values, \nconsider Rx or regular Observables for now.\n\n(Thanks to [@awto](https://github.com/awto) for the example)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiemccrindle%2Faxax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamiemccrindle%2Faxax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiemccrindle%2Faxax/lists"}