{"id":21713914,"url":"https://github.com/cytle/mp-promisify","last_synced_at":"2025-04-12T19:04:11.404Z","repository":{"id":57303458,"uuid":"125953731","full_name":"cytle/mp-promisify","owner":"cytle","description":" 小程序接口promise化，async/await水到渠成","archived":false,"fork":false,"pushed_at":"2018-03-20T11:31:35.000Z","size":53,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T19:04:02.184Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cytle.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":"2018-03-20T03:12:32.000Z","updated_at":"2018-12-22T08:29:28.000Z","dependencies_parsed_at":"2022-09-18T19:41:00.120Z","dependency_job_id":null,"html_url":"https://github.com/cytle/mp-promisify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fmp-promisify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fmp-promisify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fmp-promisify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fmp-promisify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cytle","download_url":"https://codeload.github.com/cytle/mp-promisify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618275,"owners_count":21134200,"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-11-26T00:28:45.222Z","updated_at":"2025-04-12T19:04:11.365Z","avatar_url":"https://github.com/cytle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mp-promisify\n\n小程序接口promise化，`async`/`await`水到渠成\n\n## 使用\n\n```js\nconst promisify = require('mp-promisify');\n\nconst request = promisify(wx.request);\nconst setStorage = promisify.keyDataPromisify(wx.setStorage);\n\nrequest({\n  url: 'foo/1'\n}).then((result) =\u003e {\n  console.log(\"The result of request foo/1\", result);\n}, (e) =\u003e {\n  console.log(\"request had error\", e);\n});\n\nsetStorage('foo', '123')\n  .then((result) =\u003e {\n    console.log(\"The result of setStorage foo\", result);\n  }, (e) =\u003e {\n    console.log(\"setStorage had error\", e);\n  });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytle%2Fmp-promisify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcytle%2Fmp-promisify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytle%2Fmp-promisify/lists"}