{"id":21721151,"url":"https://github.com/danielearwicker/node-funkify","last_synced_at":"2026-05-13T07:35:54.210Z","repository":{"id":18067219,"uuid":"21127309","full_name":"danielearwicker/node-funkify","owner":"danielearwicker","description":"Like thunkify-wrap, but (a) doesn't modify the original object and (b) copes with functions that have function properties","archived":false,"fork":false,"pushed_at":"2014-06-23T14:03:47.000Z","size":120,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T14:41:51.572Z","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/danielearwicker.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":"2014-06-23T13:32:14.000Z","updated_at":"2016-06-08T19:14:17.000Z","dependencies_parsed_at":"2022-07-26T20:47:05.135Z","dependency_job_id":null,"html_url":"https://github.com/danielearwicker/node-funkify","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/danielearwicker%2Fnode-funkify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielearwicker%2Fnode-funkify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielearwicker%2Fnode-funkify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielearwicker%2Fnode-funkify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielearwicker","download_url":"https://codeload.github.com/danielearwicker/node-funkify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244693706,"owners_count":20494497,"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-26T02:14:20.556Z","updated_at":"2026-05-13T07:35:49.190Z","avatar_url":"https://github.com/danielearwicker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## funkify\n\nTo thunkify an individual function you can use [thunkify](https://www.npmjs.org/package/thunkify).\n\nWhat if you want to easily thunkify all the functions of a module or other object? \n\nOne popular solution I tried was [thunkify-wrap](https://www.npmjs.org/package/thunkify-wrap). It modifies the original object, overwriting its functions with the thunkified replacements. This could break some libraries if one exported function calls another. Also makes it difficult to keep the original object so you can opt to directly call the non-thunkified functions when you need to. Also it doesn't deal correctly with functions that have function properties of their own. e.g. [request](https://www.npmjs.org/package/request).\n\nSo I created funkify to avoid these issues. It always returns a new object, leaving the original untouched. Also it deals with modules that are really just functions with their own function properties.\n\n## Installation\n\n[![NPM](https://nodei.co/npm/funkify.png)](https://nodei.co/npm/funkify/)\n\n## Usage\n\n```javascript\nvar funkify = require('funkify');\n\n// request() and request.post() get wrapped\nvar request = funkify(require('request'));\n\n// redis client gets wrapped\nvar redis = funkify(require('redis').createClient());\n\n// in a generator\nvar myListLength = yield redis.llen('myList');\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielearwicker%2Fnode-funkify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielearwicker%2Fnode-funkify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielearwicker%2Fnode-funkify/lists"}