{"id":37583197,"url":"https://github.com/zpbappi/gift-wrapper","last_synced_at":"2026-01-16T09:44:06.256Z","repository":{"id":57251009,"uuid":"44362895","full_name":"zpbappi/gift-wrapper","owner":"zpbappi","description":"A `Q` wrapper for the `gift` library to perform git operations in node","archived":false,"fork":false,"pushed_at":"2016-01-15T00:31:47.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-26T21:21:34.155Z","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/zpbappi.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":"2015-10-16T04:49:18.000Z","updated_at":"2016-01-15T00:29:34.000Z","dependencies_parsed_at":"2022-08-24T16:52:12.151Z","dependency_job_id":null,"html_url":"https://github.com/zpbappi/gift-wrapper","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zpbappi/gift-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpbappi%2Fgift-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpbappi%2Fgift-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpbappi%2Fgift-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpbappi%2Fgift-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zpbappi","download_url":"https://codeload.github.com/zpbappi/gift-wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpbappi%2Fgift-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"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":[],"created_at":"2026-01-16T09:44:02.678Z","updated_at":"2026-01-16T09:44:06.248Z","avatar_url":"https://github.com/zpbappi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gift-wrapper\nA [Q](https://github.com/kriskowal/q) wrapper for the [gift](https://github.com/notatestuser/gift) library to perform git operations in node.\n\n## Installation\nIt does not get any easier.\n```\nnpm install gift-wrapper\n```\n\n## API documentation\n`gift-wrapper` API is (almost) exactly same as `gift`. Only differece is, instead of doing the folowing in `gift`\n```js\nsomeObject.some_method( [arguments], callback );\n```\n\nwe will be able to do the following in `gift-wrapper`\n```js\nsomeObject.some_method( [arguments] )\n.then( some_callback )\n.fail( error_handler )\n```\n\nHere is the link to [gift README file](https://github.com/notatestuser/gift/blob/master/README.md) for API reference.\n\n### Special note about callbacks\nThere are two forms of callbacks in `gift`. They are-\n\n1. `callback (error, result)`\n2. `callback (result)`\n\nHowever, callback function of form `callback(error, result)` is not present\nin `gift-wrapper`. Instead, the `error` parameter will be available in error handlers\nof `Q` promises (i.e. in `fail()` method) in appropriate situations. All other callback\nfunctions from `gift` remains same and results are avaialble in immediate `then()` after the call.\n\n### Synchronous execution\nAlthough very rare, but there are few function in `gift` which executes in a synchronous manner\nand returns the result of execution directly, rather than via a callback function.\nThis behavior remains the same in `gift-wrapper` to be consistent with `gift`.\n\n### Example\n```js\nvar gw = require(\"gift-wrapper\");\n\nvar repo = gw(\"/path/to/local/repo\");\n\nrepo.identity()\n.then(function(id){\n  console.log(id); // asynchronously getting author information from the repository\n  return repo.status();\n})\n.then(function(status){\n  console.log(status); // asynchronously getting status of the repository\n})\n.fail(console.error); // sending errors to print in stderr, if there is any error\n\nvar tree = repo.tree();\nconsole.log(tree); // synchronously getting the tree from the repository\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzpbappi%2Fgift-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzpbappi%2Fgift-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzpbappi%2Fgift-wrapper/lists"}