{"id":21010633,"url":"https://github.com/prohetamine/forpromise","last_synced_at":"2026-04-25T15:34:49.490Z","repository":{"id":111366763,"uuid":"382330094","full_name":"prohetamine/forPromise","owner":"prohetamine","description":"⚙️ While for promise","archived":false,"fork":false,"pushed_at":"2022-02-13T12:54:01.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-31T01:58:02.599Z","etag":null,"topics":["javascript","npm","npm-package","promise"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/prohetamine.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-02T11:49:16.000Z","updated_at":"2022-02-13T12:54:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc1bf7b3-b3ee-4f74-85fa-430e5fca6ced","html_url":"https://github.com/prohetamine/forPromise","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prohetamine/forPromise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prohetamine%2FforPromise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prohetamine%2FforPromise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prohetamine%2FforPromise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prohetamine%2FforPromise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prohetamine","download_url":"https://codeload.github.com/prohetamine/forPromise/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prohetamine%2FforPromise/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32267710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["javascript","npm","npm-package","promise"],"created_at":"2024-11-19T09:21:50.318Z","updated_at":"2026-04-25T15:34:49.463Z","avatar_url":"https://github.com/prohetamine.png","language":"JavaScript","funding_links":["https://www.patreon.com/prohetamine"],"categories":[],"sub_categories":[],"readme":"# forPromise\n\nedit me\n\n##### lang: [ru](#rulang) [en](#enlang)\n\n\n# \u003ca name=\"rulang\"\u003eforPromise\u003c/a\u003e\n\n### С чего начать\n\nУстановим npm модуль  ```forPromise```\n\n```sh\n$ npm install forPromise\n```\n\nили\n\n```sh\n$ yarn add forPromise\n```\n\nили\n\n```sh\n$ yarn add https://github.com/prohetamine/forPromise\n```\n\n### Примеры и описание\n\nПодключение модуля\n\n```sh\nconst { prototype, forPromise } = require('forPromise')\n```\n\n#### \u003ca name=\"prototype\"\u003eprototype\u003c/a\u003e\n\nФункция [prototype](#prototype) добавляет в прототипы массивов новую функцию forPromise.\n\n| параметры | значение по-умолчанию | информация |\n| ------ | ------ | ------ |\n| function | undefined | функция обратного вызова должна возвращать промис |\n\n\n```sh\nconst { prototype } = require('forPromise')\nconst axios = require('axios')\n\nprototype() // inject array prototype\n\n;(async () =\u003e {\n  const arr = [1, 2, 3, 4, 5]\n\n  const newArr = await arr.forPromise(\n    id =\u003e axios.get(`https://jsonplaceholder.typicode.com/todos/${id}`).then(({ data }) =\u003e data)\n  )\n\n  console.log(newArr)\n})()\n```\n\n#### \u003ca name=\"for-promise\"\u003eforPromise\u003c/a\u003e\n\nФункция [forPromise](#for-promise) выполняет массив заданных промисов\n\n| параметры | значение по-умолчанию | информация |\n| ------ | ------ | ------ |\n| Array | undefined | массив элементов |\n| function | undefined | функция обратного вызова должна возвращать промис |\n\n```sh\nconst { forPromise } = require('forPromise')\nconst axios = require('axios')\n\n;(async () =\u003e {\n  const arr = [1, 2, 3, 4, 5]\n\n  const newArr = await forPromise(\n    arr,\n    id =\u003e axios.get(`https://jsonplaceholder.typicode.com/todos/${id}`).then(({ data }) =\u003e data)\n  )\n\n  console.log(newArr)\n})()\n```\n\n### Другие примеры\n\n[больше...](/examples)\n\n### Контакты\n\nМой Телеграм: [@prohetamine](https://t.me/prohetamine), [канал](https://t.me/prohetamine)\n\nПочта: prohetamine@gmail.com\n\nДонат денег: [patreon](https://www.patreon.com/prohetamine)\n\nЕсли у вас есть какие-либо вопросы и/или предложения, пожалуйста, напишите мне в телеграмме, если вы найдете ошибки также дайте мне знать, я буду очень благодарен.\n\n-------- OTHER WORLD --------\n\n##### lang: [ru](#rulang) [en](#enlang)\n\n\n# \u003ca name=\"rulang\"\u003eforPromise\u003c/a\u003e\n\n### Get started\n\nInstall the npm module ```forPromise```\n\n```sh\n$ npm install forPromise\n```\n\nor\n\n```sh\n$ yarn add forPromise\n```\n\nor\n\n```sh\n$ yarn add https://github.com/prohetamine/forPromise\n```\n\n### Examples and description\n\nConnecting the module\n\n```sh\nconst { prototype, forPromise } = require('forpromise')\n```\n\n#### \u003ca name=\"prototype\"\u003eprototype\u003c/a\u003e\n\nThe [prototype](#prototype) function adds a new forPromise function to the array prototypes.\n\n| parameters | default value | information|\n| ------ | ------ | ------ |\n| function | undefined | the callback function should return a promise |\n\n```sh\nconst { prototype } = require('forPromise')\nconst axios = require('axios')\n\nprototype() // inject array prototype\n\n;(async () =\u003e {\n  const arr = [1, 2, 3, 4, 5]\n\n  const newArr = await arr.forPromise(\n    id =\u003e axios.get(`https://jsonplaceholder.typicode.com/todos/${id}`).then(({ data }) =\u003e data)\n  )\n\n  console.log(newArr)\n})()\n```\n\n#### \u003ca name=\"for-promise\"\u003eforPromise\u003c/a\u003e\n\nThe [forPromise](#for-promise) function executes an array of specified promises\n\n| parameters | default value | information|\n| ------ | ------ | ------ |\n| Array | undefined / array of elements |\n| function | undefined | the callback function should return a promise |\n\n\n```sh\nconst { forPromise } = require('forPromise')\nconst axios = require('axios')\n\n;(async () =\u003e {\n  const arr = [1, 2, 3, 4, 5]\n\n  const newArr = await forPromise(\n    arr,\n    id =\u003e axios.get(`https://jsonplaceholder.typicode.com/todos/${id}`).then(({ data }) =\u003e data)\n  )\n\n  console.log(newArr)\n})()\n```\n\n### Other examples\n\n[more...](/examples)\n\n### Contacts\n\nMy Telegram: [@prohetamine](https://t.me/prohetamine), [channel](https://t.me/prohetamine)\n\nEmail: prohetamine@gmail.com\n\nDonat money: [patreon](https://www.patreon.com/prohetamine)\n\nIf you have any questions and/or suggestions, please email me in telegram, if you find any bugs also let me know, I will be very grateful.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprohetamine%2Fforpromise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprohetamine%2Fforpromise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprohetamine%2Fforpromise/lists"}