{"id":16641992,"url":"https://github.com/make-github-pseudonymous-again/js-itertools","last_synced_at":"2025-10-30T11:31:27.707Z","repository":{"id":21122921,"uuid":"24423685","full_name":"make-github-pseudonymous-again/js-itertools","owner":"make-github-pseudonymous-again","description":":hammer_and_wrench: Python's iterable and iterator library for JavaScript","archived":false,"fork":false,"pushed_at":"2022-05-26T10:40:21.000Z","size":1607,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T17:10:05.022Z","etag":null,"topics":["agpl","iter","iterable","iterator","javascript","js","list","loop","map","reduce"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/make-github-pseudonymous-again.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":"2014-09-24T16:49:35.000Z","updated_at":"2022-10-15T06:24:23.000Z","dependencies_parsed_at":"2022-08-26T20:20:23.349Z","dependency_job_id":null,"html_url":"https://github.com/make-github-pseudonymous-again/js-itertools","commit_stats":null,"previous_names":["aureooms/js-itertools"],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/make-github-pseudonymous-again%2Fjs-itertools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/make-github-pseudonymous-again%2Fjs-itertools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/make-github-pseudonymous-again%2Fjs-itertools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/make-github-pseudonymous-again%2Fjs-itertools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/make-github-pseudonymous-again","download_url":"https://codeload.github.com/make-github-pseudonymous-again/js-itertools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238960293,"owners_count":19559239,"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","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":["agpl","iter","iterable","iterator","javascript","js","list","loop","map","reduce"],"created_at":"2024-10-12T07:48:32.034Z","updated_at":"2025-10-30T11:31:22.438Z","avatar_url":"https://github.com/make-github-pseudonymous-again.png","language":null,"readme":":hammer_and_wrench:\n`js-itertools`\n[![License](https://img.shields.io/github/license/make-github-pseudonymous-again/js-itertools.svg)](https://raw.githubusercontent.com/make-github-pseudonymous-again/js-itertools/main/LICENSE)\n==\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://xkcd.com/353\"\u003e\n\u003cimg src=\"https://imgs.xkcd.com/comics/python.png\" width=\"450\"\u003e\n\u003c/a\u003e\u003cbr/\u003e\n© \u003ca href=\"https://xkcd.com\"\u003exkcd.com\u003c/a\u003e\n\u003c/p\u003e\n\nPython's iterable and iterator library for JavaScript.\nParent is [js-library](https://github.com/make-github-pseudonymous-again/js-library).\n\n\u003e :warning: Depending on your environment, the code may require\n\u003e `regeneratorRuntime` to be defined, for instance by importing\n\u003e [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).\n\n```js\nimport {cycle} from '@iterable-iterator/cycle';\nimport {chain} from '@iterable-iterator/chain';\ncycle( chain( [ 0 , 1 , 2 ] , [ 3 , 4 , 5 ] ) ) ; // 0 1 2 3 4 5 0 1 ...\n```\n\n## :newspaper: Description\n\nThe goal of this project is to make (the parts that interest me of)\nthe following python constructs/idioms/libraries available in JavaScript under the\n[![AGPL-3.0 license](https://img.shields.io/github/license/make-github-pseudonymous-again/js-itertools.svg)](https://raw.githubusercontent.com/make-github-pseudonymous-again/js-itertools/main/LICENSE).\n  - `iter`, `next`, `StopIteration`, `list`, `sorted`, `map`, `zip`, `filter`, `sum`, `any`, `all`, `min`, `max`\n  - [itertools](https://docs.python.org/3/library/itertools.html)\n  - [itertools recipes](https://docs.python.org/3/library/itertools.html#itertools-recipes)\n  - [more-itertools](https://pypi.org/project/more-itertools)\n  - [cardinality](https://github.com/wbolster/cardinality)\n  - [`reduce`](https://docs.python.org/3/library/functools.html?highlight=reduce#functools.reduce)\n\nThe corresponding software library used to be released as a monolith.\nIt has since been split up into multiple packages.\n\n## :deciduous_tree: Hierarchy\n\nThe packages are released under multiple npm @scopes.\nExtra features are marked with a `*`.\n\n### [`@iterable-iterator`](https://github.com/iterable-iterator)\n\n  - [`@iterable-iterator/cardinality`](https://github.com/iterable-iterator/cardinality):\n    `isEmpty`, `count`, ...\n  - [`@iterable-iterator/chain`](https://github.com/iterable-iterator/chain):\n    `chain`, `chain.from_iterable` as `_chain`\n  - [`@iterable-iterator/consume`](https://github.com/iterable-iterator/consume):\n    `consume(it, n)` as `consume`, `consume(it)` as `exhaust`\n  - [`@iterable-iterator/convolution`](https://github.com/iterable-iterator/convolution):\n    `convolve` as `convolution`, `_convolution*`\n  - [`@iterable-iterator/count`](https://github.com/iterable-iterator/count):\n    `count`\n  - [`@iterable-iterator/cycle`](https://github.com/iterable-iterator/cycle):\n    `cycle`, `ncycles` as `ncycle`\n  - [`@iterable-iterator/filter`](https://github.com/iterable-iterator/filter):\n    `filter`, `filtertrue`, `filterfalse`, `compress`\n  - [`@iterable-iterator/group`](https://github.com/iterable-iterator/group):\n    `group`, `groupby`, `by*`\n  - [`@iterable-iterator/iter`](https://github.com/iterable-iterator/iter):\n    `iter`\n  - [`@iterable-iterator/list`](https://github.com/iterable-iterator/list):\n    `list`\n  - [`@iterable-iterator/map`](https://github.com/iterable-iterator/map):\n    `map` (:warning: unary only), `starmap`, `pick`\n  - [`@iterable-iterator/next`](https://github.com/iterable-iterator/next):\n    `next`, `StopIteration`, `_next*`\n  - [`@iterable-iterator/range`](https://github.com/iterable-iterator/range):\n    `range`\n  - [`@iterable-iterator/reduce`](https://github.com/iterable-iterator/reduce):\n    `reduce`, `sum`, `any`, `all`, `some`, `min`, `max`\n  - [`@iterable-iterator/repeat`](https://github.com/iterable-iterator/repeat):\n    `repeat`, `nrepeat`\n  - [`@iterable-iterator/reversed`](https://github.com/iterable-iterator/reversed):\n    `reversed`\n  - [`@iterable-iterator/round-robin`](https://github.com/iterable-iterator/round-robin):\n    `roundRobin`\n  - [`@iterable-iterator/select`](https://github.com/iterable-iterator/select):\n    `first`, `last`, `nth*` (:sparkles: supports negative indices)\n  - [`@iterable-iterator/slice`](https://github.com/iterable-iterator/slice):\n    `take` (also aliased to `head`), `drop`, `trunc`, `tail`, `takewhile`, `dropwhile`, `islice` as `slice`\n  - [`@iterable-iterator/sorted`](https://github.com/iterable-iterator/sorted):\n    `sorted`\n  - [`@iterable-iterator/tee`](https://github.com/iterable-iterator/tee):\n    `tee`\n  - [`@iterable-iterator/window`](https://github.com/iterable-iterator/window):\n    `window*`\n  - [`@iterable-iterator/zip`](https://github.com/iterable-iterator/zip):\n    `zip`, `zip_longest` as `ziplongest`, `enumerate`\n\n### [`@combinatorics`](https://github.com/computational-combinatorics)\n  - [`@combinatorics/n-combinations`](https://github.com/computational-combinatorics/n-combinations): `combinations`, `_combinations*`\n  - [`@combinatorics/n-multicombinations`](https://github.com/computational-combinatorics/n-multicombinations): `combinations_with_replacement` as `multicombinations`, `_multicombinations*`\n  - [`@combinatorics/n-permutations`](https://github.com/computational-combinatorics/n-permutations): `permutations`, `_permutations*`\n\n### [`@set-theory`](https://github.com/set-theory)\n\n  - [`@set-theory/cartesian-product`](https://github.com/set-theory/cartesian-product): `product`, `diagonal*`\n  - [`@set-theory/closure`](https://github.com/set-theory/closure): `closure*`\n\n\n\n## :link: More references in Python and JavaScript\n\n  - http://mochi.github.io/mochikit/doc/html/MochiKit/Iter.html\n  - https://github.com/cweider/js-itertools\n  - http://itertoolsjs.com\n  - https://github.com/thegoleffect/node-itertools\n  - http://rfw.name/sloth.js\n  - https://github.com/lodash/lodash\n  - https://github.com/StreetStrider/aux.js\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmake-github-pseudonymous-again%2Fjs-itertools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmake-github-pseudonymous-again%2Fjs-itertools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmake-github-pseudonymous-again%2Fjs-itertools/lists"}