{"id":13485088,"url":"https://github.com/luma-dev/deno-iterator-helpers","last_synced_at":"2025-09-04T17:49:38.057Z","repository":{"id":45413325,"uuid":"404942958","full_name":"luma-dev/deno-iterator-helpers","owner":"luma-dev","description":"Strict and wrapper version implementation for https://github.com/tc39/proposal-iterator-helpers.","archived":false,"fork":false,"pushed_at":"2021-12-15T01:16:52.000Z","size":19,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-20T12:26:57.940Z","etag":null,"topics":["deno","iterator-helpers","polyfill"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luma-dev.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":"2021-09-10T03:21:50.000Z","updated_at":"2022-11-14T03:33:04.000Z","dependencies_parsed_at":"2022-09-14T07:00:53.440Z","dependency_job_id":null,"html_url":"https://github.com/luma-dev/deno-iterator-helpers","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/luma-dev/deno-iterator-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luma-dev%2Fdeno-iterator-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luma-dev%2Fdeno-iterator-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luma-dev%2Fdeno-iterator-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luma-dev%2Fdeno-iterator-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luma-dev","download_url":"https://codeload.github.com/luma-dev/deno-iterator-helpers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luma-dev%2Fdeno-iterator-helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273648479,"owners_count":25143628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"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":["deno","iterator-helpers","polyfill"],"created_at":"2024-07-31T17:01:45.500Z","updated_at":"2025-09-04T17:49:38.009Z","avatar_url":"https://github.com/luma-dev.png","language":"TypeScript","readme":"# deno-iterator-helpers\n\n[![Codecov](https://img.shields.io/codecov/c/github/luma-dev/deno-iterator-helpers?style=flat-square)](https://app.codecov.io/gh/luma-dev/deno-iterator-helpers)\n\nStrict and wrapper version implementation for\nhttps://github.com/tc39/proposal-iterator-helpers.\n\n## Usage\n\n```ts\nimport {\n  asyncIteratorFrom as fromA,\n  iteratorFrom as from,\n  wrapAsyncIterator as wrapA,\n  wrapIterator as wrap,\n} from \"https://deno.land/x/iterator_helpers/mod.ts\";\n\nfunction* naturals() {\n  let i = 0;\n  while (true) {\n    yield i;\n    i += 1;\n  }\n}\n\nconst arr1 = wrap(naturals())\n  .filter((n) =\u003e n % 2 === 1) // filter odd numbers\n  .map((n) =\u003e n ** 2) // square numbers\n  .flatMap((n) =\u003e [n, n]) // twice each numbers\n  .take(10) // cut up to 10 items\n  .toArray(); // evaluate and collect items into array\nconsole.log(arr1); // [1, 1, 9, 9, 25, 25, 49, 49, 81, 81]\n\nconst arr2 = await wrapA(fromA(naturals()))\n  .filter(async (n) =\u003e {\n    const res = await fetch(`https://api.isevenapi.xyz/api/iseven/${n}/`);\n    if (!res.body) throw new Error(\"No body\");\n    const raw = Uint8Array.from(\n      await wrapA(fromA(res.body))\n        .flatMap((e) =\u003e e)\n        .toArray(),\n    );\n    const obj = JSON.parse(new TextDecoder().decode(raw));\n    return obj.iseven;\n  }) // filter even numbers\n  .map((n) =\u003e n ** 2) // square numbers\n  .flatMap((n) =\u003e [n, n]) // twice each numbers\n  .take(10) // cut up to 10 items\n  .toArray(); // evaluate and collect items into array\nconsole.log(arr2); // [0, 0, 4, 4, 16, 16, 36, 36, 64, 64]\n```\n\n## Goals\n\n- Implement all proposed features with wrapper API.\n\n## Non-goals\n\n- To make comprehensive library.\n  - Just include defined features in the proposal.\n- To extend global prototype.\n  - Provide APIs via wrapper and method chaining.\n\n## Iteration\n\n- Until proposal becomes stage4, keeping it v0.x and up to date with bumping\n  minor if there is breaking change.\n- When interfaces are determined, bump major.\n- When implemented natively, keep maintaining for months.\n- After it passes some months, archive this project.\n\n## Links\n\n- https://github.com/tc39/proposal-iterator-helpers\n- https://tc39.es/proposal-iterator-helpers\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluma-dev%2Fdeno-iterator-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluma-dev%2Fdeno-iterator-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluma-dev%2Fdeno-iterator-helpers/lists"}