{"id":37020965,"url":"https://github.com/hyperjump-io/pact","last_synced_at":"2026-01-14T02:27:35.681Z","repository":{"id":57117018,"uuid":"202247195","full_name":"hyperjump-io/pact","owner":"hyperjump-io","description":"Higher order functions for iterators/generators and async iterators/generators","archived":false,"fork":false,"pushed_at":"2025-10-20T19:01:19.000Z","size":68,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T07:22:56.209Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pact.hyperjump.io/","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/hyperjump-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["hyperjump-io"]}},"created_at":"2019-08-14T01:08:42.000Z","updated_at":"2025-10-20T19:01:16.000Z","dependencies_parsed_at":"2025-03-10T21:22:56.580Z","dependency_job_id":"4320e08a-6f41-4a0a-8b26-e5669f6045f0","html_url":"https://github.com/hyperjump-io/pact","commit_stats":null,"previous_names":["jdesrosiers/hyperjump-pact"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/hyperjump-io/pact","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjump-io%2Fpact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjump-io%2Fpact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjump-io%2Fpact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjump-io%2Fpact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperjump-io","download_url":"https://codeload.github.com/hyperjump-io/pact/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjump-io%2Fpact/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2026-01-14T02:27:35.040Z","updated_at":"2026-01-14T02:27:35.675Z","avatar_url":"https://github.com/hyperjump-io.png","language":"TypeScript","funding_links":["https://github.com/sponsors/hyperjump-io"],"categories":[],"sub_categories":[],"readme":"# Hyperjump Pact\n\nHyperjump Pact is a utility library that provides higher order functions for\nworking with iterators and async iterators.\n\n## Installation\nDesigned for node.js (ES Modules, TypeScript) and browsers.\n\n```bash\nnpm install @hyperjump/pact --save\n```\n\n## Usage\n\n```javascript\nimport { pipe, range, map, filter, reduce } from \"@hyperjump/pact\";\n\n\nconst result = pipe(\n  range(1, 10),\n  filter((n) =\u003e n % 2 === 0),\n  map((n) =\u003e n * 2),\n  reduce((sum, n) =\u003e sum + n, 0)\n);\nconsole.log(result);\n```\n\n```javascript\nimport { pipe, asyncMap, asyncFilter, asyncReduce } from \"@hyperjump/pact\";\n// You can alternatively import the async functions without the prefix\n// import { pipe, map, filter, reduce } from \"@hyperjump/pact/async\";\n\n\nconst asyncSequence = async function* () {\n  yield 1;\n  yield 2;\n  yield 3;\n  yield 4;\n  yield 5;\n};\n\nfor await (const value of asyncSequence()) {\n  console.log(value);\n}\n\nconst result = await pipe(\n  asyncSequence(),\n  asyncFilter((n) =\u003e n % 2 === 0),\n  asyncMap((n) =\u003e n * 2),\n  asyncReduce((sum, n) =\u003e sum + n, 0)\n);\nconsole.log(result);\n```\n\n## API\n\nhttps://pact.hyperjump.io\n\n## Contributing\n\n### Tests\n\nRun the tests\n\n```bash\nnpm test\n```\n\nRun the tests with a continuous test runner\n\n```bash\nnpm test -- --watch\n```\n\n[hyperjump]: https://github.com/hyperjump-io/browser\n[jref]: https://github.com/hyperjump-io/browser/blob/master/src/json-reference/README.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjump-io%2Fpact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperjump-io%2Fpact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjump-io%2Fpact/lists"}