{"id":15598171,"url":"https://github.com/boneskull/promwrap","last_synced_at":"2025-03-26T03:32:02.335Z","repository":{"id":65475892,"uuid":"101248840","full_name":"boneskull/promwrap","owner":"boneskull","description":"Proxy-Powered Promisification for your Pleasure","archived":true,"fork":false,"pushed_at":"2020-07-21T20:27:06.000Z","size":13,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T12:21:23.908Z","etag":null,"topics":["callback","nodeback","promise","promises","promisification","promisify","promisifyall","wrapper"],"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/boneskull.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":"2017-08-24T03:13:37.000Z","updated_at":"2024-11-19T20:01:50.000Z","dependencies_parsed_at":"2023-01-25T06:15:27.365Z","dependency_job_id":null,"html_url":"https://github.com/boneskull/promwrap","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fpromwrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fpromwrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fpromwrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fpromwrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boneskull","download_url":"https://codeload.github.com/boneskull/promwrap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245585243,"owners_count":20639667,"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":["callback","nodeback","promise","promises","promisification","promisify","promisifyall","wrapper"],"created_at":"2024-10-03T01:29:32.254Z","updated_at":"2025-03-26T03:32:02.045Z","avatar_url":"https://github.com/boneskull.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# promwrap\n\nWraps modules, and other objects, full of callback functions in promises.\n\n```javascript\nlet fun = (x, cb) =\u003e cb(null, x)\nlet _module = {fun, prop: 'test'}\n\ntest('test basics', async t =\u003e {\n  t.plan(4)\n  let mod = promwrap(_module)\n  t.same(mod.prop, 'test')\n  t.same(mod.prop, 'test')\n  t.same(await mod.fun('test1'), 'test1')\n  t.same(await promwrap(fun)('test2'), 'test2')\n})\n```\n\n## API\n\n### `promwrap(value\u003cT\u003e, {exclude: string[]|string, excludeMain: bool, own: bool}): T`\n\nPromisify all function properties of `value`.  If `value` is a `Function`,\nit will be promisified instead.  Members of `Object.prototype` are *not*\npromisified.\n\nReturns `value`, wrapped by a `Proxy`.\n\n- If `exclude` is supplied, do not promisify this prop/list of props.\n- If `excludeMain` is truthy and `value` is a `Function`, treat `value` like a\n  plain `Object` and promisify its props instead of `value` itself.  In \n  addition, members of `Function.prototype` will *not* be promisified.\n- If `own` is truthy, *only* promisify the `Object`'s \"own\" (in the \n  `Object.hasOwnProperty()` sense) props\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboneskull%2Fpromwrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboneskull%2Fpromwrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboneskull%2Fpromwrap/lists"}