{"id":17736663,"url":"https://github.com/parro-it/ai-map","last_synced_at":"2025-03-31T19:17:11.647Z","repository":{"id":57174771,"uuid":"111469065","full_name":"parro-it/ai-map","owner":"parro-it","description":"Map over async iterables","archived":false,"fork":false,"pushed_at":"2017-11-29T18:31:29.000Z","size":301,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-05T11:36:00.740Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/parro-it.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":"2017-11-20T22:21:03.000Z","updated_at":"2017-11-20T22:22:13.000Z","dependencies_parsed_at":"2022-09-03T08:51:49.289Z","dependency_job_id":null,"html_url":"https://github.com/parro-it/ai-map","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fai-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fai-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fai-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fai-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parro-it","download_url":"https://codeload.github.com/parro-it/ai-map/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523847,"owners_count":20791444,"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-10-26T00:23:57.963Z","updated_at":"2025-03-31T19:17:11.623Z","avatar_url":"https://github.com/parro-it.png","language":"JavaScript","readme":"# ai-map\n\n[![Travis Build Status](https://img.shields.io/travis/parro-it/ai-map/master.svg)](http://travis-ci.org/parro-it/ai-map)\n[![NPM downloads](https://img.shields.io/npm/dt/ai-map.svg)](https://npmjs.org/package/ai-map)\n\n\u003e Map over async iterables\n\nThe map() function creates a new async iterable with the results of calling a\nprovided function on every element in the async iterable.\n\n\u003e **_This module is part of\n\u003e [Async iterable fun](https://github.com/parro-it/ai-fun), a complete toolset\n\u003e of modules to work with async iterables._**\n\n## Usage\n\ndescription of the example\n\n```js\nimport aiMap from 'ai-map';\n\nfor (const item of {aiMap}()) {\n  yield item;\n};\n```\n\nThis will output\n\n```\n\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n### index\n\nCreates a new async iterable with the results of calling a\nprovided function on every element in the async iterable.\n\n**Parameters**\n\n-   `data` **AsyncIterable** The async iterable to map over\n-   `transform` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Function to apply to each element in the async iterable, taking 3 arguments:\n        .    ```\n        __currentValue__ - The current element being processed in the async iterable.\n\n        __currentIndex__ - The index of the current element being processed in the async\n        iterable. Starts at index 0\n\n        __data__ - The async iterable map was called upon.\n        ```\n\nReturns **AyncIterable** An iterable that iterates over the `transform` calls results.\n\n### with\n\nHigher order function that partially apply `transform` to the\nmap function.\n\n**Parameters**\n\n-   `transform` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** The transform argument to partially apply to map\n\nReturns **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** A `map` unary function that take a data argument\nand return a new async iterable.\n\n## Install\n\nWith [npm](https://npmjs.org/) installed, run\n\n```bash\nnpm install --save ai-map\n```\n\n## See Also\n\n-   [`parro-it/ai-fun`](https://github.com/parro-it/ai-fun)\n-   [`noffle/common-readme`](https://github.com/noffle/common-readme)\n\n## License\n\nMIT Licensed © 2017 Andrea Parodi\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Fai-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparro-it%2Fai-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Fai-map/lists"}