{"id":21853322,"url":"https://github.com/emnudge/domyno","last_synced_at":"2025-04-14T16:36:00.614Z","repository":{"id":42932059,"uuid":"238916052","full_name":"EmNudge/Domyno","owner":"EmNudge","description":"Iterator  Utility Library","archived":false,"fork":false,"pushed_at":"2023-01-06T02:31:16.000Z","size":482,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T13:10:23.958Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EmNudge.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":"2020-02-07T12:27:33.000Z","updated_at":"2021-06-25T13:02:55.000Z","dependencies_parsed_at":"2023-02-05T03:15:58.861Z","dependency_job_id":null,"html_url":"https://github.com/EmNudge/Domyno","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmNudge%2FDomyno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmNudge%2FDomyno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmNudge%2FDomyno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmNudge%2FDomyno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmNudge","download_url":"https://codeload.github.com/EmNudge/Domyno/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248917301,"owners_count":21182967,"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":[],"created_at":"2024-11-28T01:21:45.679Z","updated_at":"2025-04-14T16:36:00.593Z","avatar_url":"https://github.com/EmNudge.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Domyno - Iterable Utility Library\n\n## What Is This?\nDomyno is an iterable utility library. That means it's a collection of rather useful functions for dealing with iterables when such an approach becomes appealing. Why iterables and not simply arrays? You may find better explanations in [my article on Lazy Iterables](https://dev.to/emnudge/lazy-iterators-from-scratch-2903), but it essentially comes down to performance. \n\nWorking with iterables over pure arrays happens to provide us with numerous instances where we can optimize our application and still maintain code clarity through declarative function names.\n\nIt should be noted that arrays are also iterables. This library provides functions that wrap around arrays without collecting into a new array until you decide to make it do so - a.k.a. lazy.\n\n## Usage\nRegular use\n```js\nimport { map, filter } from 'domyno';\n\nconst arr = [1, 2, 3, 4, 5];\nconst mapIter = map(arr, n =\u003e n ** 2);\nconst filterIter = filter(mapIter, n =\u003e n \u003c 15);\n\n// collect into an array. Can also use the collect() function or a for loop\nconst newArr = [...filterIter];\n\nconsole.log(newArr); // [1, 4, 9]\n```\n\nPiped version\n```js\nimport { collect, pipe } from 'domyno';\nimport { map, filter } from 'domyno/pipeable';\n\nconst arr = [1, 2, 3, 4, 5];\nconst newArr = pipe(\n  map(n =\u003e n ** 2),    // curried version of map\n  filter(n =\u003e n \u003c 15), // curried version of filter\n  collect                  // collects into an array\n);\n\nconsole.log(newArr); // [1, 4, 9]\n```\n\n## Docs and Tutorials\nConsult [the wiki](https://github.com/EmNudge/Domyno/wiki) for a much greater wealth of information on all aspects of Domyno.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femnudge%2Fdomyno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femnudge%2Fdomyno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femnudge%2Fdomyno/lists"}