{"id":17445958,"url":"https://github.com/jamen/pull-await","last_synced_at":"2025-04-22T14:21:56.600Z","repository":{"id":96785023,"uuid":"67020204","full_name":"jamen/pull-await","owner":"jamen","description":"Await promises in a pull-stream.","archived":false,"fork":false,"pushed_at":"2016-08-31T16:04:14.000Z","size":5,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-09T17:58:04.746Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jamen.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-31T08:47:19.000Z","updated_at":"2021-12-31T13:30:14.000Z","dependencies_parsed_at":"2023-05-29T03:15:29.905Z","dependency_job_id":null,"html_url":"https://github.com/jamen/pull-await","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"87888ddab991b55021d4002094e72c3f3ffb6274"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-await","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-await/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-await/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-await/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamen","download_url":"https://codeload.github.com/jamen/pull-await/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249899570,"owners_count":21342413,"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-17T18:18:55.062Z","updated_at":"2025-04-22T14:21:56.571Z","avatar_url":"https://github.com/jamen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pull-await [![NPM version](https://badge.fury.io/js/pull-await.svg)](https://npmjs.org/package/pull-await) [![Build Status](https://travis-ci.org/jamen/pull-await.svg?branch=master)](https://travis-ci.org/jamen/pull-await)\n\n\u003e Await promises in a pull-stream.\n\n```javascript\npull(\n  pull.values([ 'hello', Promise.resolve('world') ]),\n  await, // use pull-await on promises or anything thenable.\n  pull.collect(function(err, res) {\n    t.same(res, ['hello', 'world']);\n  })\n);\n```\n\n## Installation\n\n```sh\n$ npm install --save pull-await\n```\n\n## Usage\n\nPull promises, thenable objects, or regular through and await those necessary.\n\n```js\nawait(function(err, cb) {\n  // Push promises to read for `await`\n  cb(null, new Promise(r =\u003e setTimeout(() =\u003e r('hello'), 1000)));\n  cb(null, Promise.resolve('cool'));\n  cb(null, 'yay!');\n  cb(true);\n})(null, function(err, data) {\n  if (err === true) return;\n  if (err) throw err;\n\n  // Log awaited data.\n  console.log(data);\n});\n```\n\n## License\n\nMIT © [Jamen Marz](https://github.com/jamen)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamen%2Fpull-await","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamen%2Fpull-await","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamen%2Fpull-await/lists"}