{"_id":"wrap-fn","_rev":"54802","name":"wrap-fn","description":"support sync, async, and generator functions","dist-tags":{"latest":"0.1.5"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"time":{"modified":"2021-06-03T10:16:42.000Z","created":"2014-09-01T01:58:51.665Z","0.1.5":"2016-02-13T07:06:25.087Z","0.1.4":"2015-01-22T01:19:38.090Z","0.1.3":"2015-01-17T02:21:22.061Z","0.1.2":"2015-01-17T01:52:24.188Z","0.1.1":"2014-09-24T17:57:37.574Z","0.1.0":"2014-09-17T18:17:46.092Z","0.0.2":"2014-09-01T03:21:53.148Z","0.0.1":"2014-09-01T01:58:51.665Z"},"users":{"fishrock123":true,"davidchase":true},"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/matthewmueller/wrap-fn.git"},"versions":{"0.1.5":{"name":"wrap-fn","version":"0.1.5","license":"MIT","description":"support sync, async, and generator functions","scripts":{"test":"make test"},"keywords":["browser","wrap","generator"],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/matthewmueller/wrap-fn.git"},"dependencies":{"co":"3.1.0"},"devDependencies":{"duo":"^0.8.2","duo-test":"^0.3.2","generator-support":"0.0.1","gnode":"0.0.8","mocha":"*","should":"*"},"files":["index.js"],"gitHead":"f6625298aecaaa96686f6ef57663f9be8d1cebf5","bugs":{"url":"https://github.com/matthewmueller/wrap-fn/issues"},"homepage":"https://github.com/matthewmueller/wrap-fn#readme","_id":"wrap-fn@0.1.5","_shasum":"f21b6e41016ff4a7e31720dbc63a09016bdf9845","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"f21b6e41016ff4a7e31720dbc63a09016bdf9845","size":2477,"noattachment":false,"key":"/wrap-fn/-/wrap-fn-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrap-fn/download/wrap-fn-0.1.5.tgz"},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/wrap-fn-0.1.5.tgz_1455347181782_0.9750053838361055"},"directories":{},"publish_time":1455347185087,"_cnpm_publish_time":1455347185087,"_hasShrinkwrap":false},"0.1.4":{"name":"wrap-fn","version":"0.1.4","description":"support sync, async, and generator functions","scripts":{"test":"make test"},"keywords":["browser","wrap","generator"],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"https://github.com/MatthewMueller/wrap-fn"},"dependencies":{"co":"3.1.0"},"devDependencies":{"duo":"^0.8.2","duo-test":"^0.3.2","generator-support":"0.0.1","gnode":"0.0.8","mocha":"*","should":"*"},"files":["index.js"],"gitHead":"44598c653ad0189ff884152a8b9a3476abbcbce9","bugs":{"url":"https://github.com/MatthewMueller/wrap-fn/issues"},"homepage":"https://github.com/MatthewMueller/wrap-fn","_id":"wrap-fn@0.1.4","_shasum":"03eba5d07ac55c2a93fa2d37a2b01f81c07bddb2","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"03eba5d07ac55c2a93fa2d37a2b01f81c07bddb2","size":2158,"noattachment":false,"key":"/wrap-fn/-/wrap-fn-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrap-fn/download/wrap-fn-0.1.4.tgz"},"directories":{},"publish_time":1421889578090,"_cnpm_publish_time":1421889578090,"_hasShrinkwrap":false},"0.1.3":{"name":"wrap-fn","version":"0.1.3","description":"support sync, async, and generator functions","scripts":{"test":"make test"},"keywords":["browser","wrap","generator"],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/wrap-fn.git"},"dependencies":{"co":"3.1.0"},"devDependencies":{"duo":"^0.8.2","duo-test":"^0.3.2","generator-support":"0.0.1","gnode":"0.0.8","mocha":"*","should":"*"},"main":"index","gitHead":"53158c95cb628bbfd6bddbb76bce6b95193fcd5d","bugs":{"url":"https://github.com/MatthewMueller/wrap-fn/issues"},"homepage":"https://github.com/MatthewMueller/wrap-fn","_id":"wrap-fn@0.1.3","_shasum":"7fb84ed318e354e9cacdc02560962ec29d555517","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"7fb84ed318e354e9cacdc02560962ec29d555517","size":20211,"noattachment":false,"key":"/wrap-fn/-/wrap-fn-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrap-fn/download/wrap-fn-0.1.3.tgz"},"directories":{},"publish_time":1421461282061,"_cnpm_publish_time":1421461282061,"_hasShrinkwrap":false},"0.1.2":{"name":"wrap-fn","version":"0.1.2","description":"support sync, async, and generator functions","scripts":{"test":"make test"},"keywords":["browser","wrap","generator"],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/wrap-fn.git"},"dependencies":{"co":"3.1.0"},"devDependencies":{"duo":"^0.8.2","duo-test":"^0.3.2","generator-support":"0.0.1","gnode":"0.0.8","mocha":"*","should":"*"},"main":"index","gitHead":"eda2b816e8ad8ec65acc21818fb57c77095de8a5","bugs":{"url":"https://github.com/MatthewMueller/wrap-fn/issues"},"homepage":"https://github.com/MatthewMueller/wrap-fn","_id":"wrap-fn@0.1.2","_shasum":"23f7f4e37875165fd421f608529ae3b8fcc1032e","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"23f7f4e37875165fd421f608529ae3b8fcc1032e","size":20190,"noattachment":false,"key":"/wrap-fn/-/wrap-fn-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrap-fn/download/wrap-fn-0.1.2.tgz"},"directories":{},"publish_time":1421459544188,"_cnpm_publish_time":1421459544188,"_hasShrinkwrap":false},"0.1.1":{"name":"wrap-fn","version":"0.1.1","description":"support sync, async, and generator functions","scripts":{"test":"make test"},"keywords":["browser","wrap","generator"],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/wrap-fn.git"},"dependencies":{"co":"3.1.0"},"devDependencies":{"duo":"^0.8.2","duo-test":"^0.3.2","generator-support":"0.0.1","gnode":"0.0.8","mocha":"*","should":"*"},"main":"index","bugs":{"url":"https://github.com/MatthewMueller/wrap-fn/issues"},"homepage":"https://github.com/MatthewMueller/wrap-fn","_id":"wrap-fn@0.1.1","_shasum":"d7f632de5c6ef1559557ae179be6bce14edc471b","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"d7f632de5c6ef1559557ae179be6bce14edc471b","size":19947,"noattachment":false,"key":"/wrap-fn/-/wrap-fn-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrap-fn/download/wrap-fn-0.1.1.tgz"},"directories":{},"publish_time":1411581457574,"_cnpm_publish_time":1411581457574,"_hasShrinkwrap":false},"0.1.0":{"name":"wrap-fn","version":"0.1.0","description":"support sync, async, and generator functions","scripts":{"test":"make test"},"keywords":["browser","wrap","generator"],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/wrap-fn.git"},"dependencies":{"co":"3.1.0"},"devDependencies":{"duo":"^0.8.2","duo-test":"^0.3.2","generator-support":"0.0.1","gnode":"0.0.8","mocha":"*","should":"*"},"main":"index","bugs":{"url":"https://github.com/MatthewMueller/wrap-fn/issues"},"homepage":"https://github.com/MatthewMueller/wrap-fn","_id":"wrap-fn@0.1.0","_shasum":"bc41259b399311b55bbe4ad815eee379e8ad9848","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"bc41259b399311b55bbe4ad815eee379e8ad9848","size":19948,"noattachment":false,"key":"/wrap-fn/-/wrap-fn-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrap-fn/download/wrap-fn-0.1.0.tgz"},"directories":{},"publish_time":1410977866092,"_cnpm_publish_time":1410977866092,"_hasShrinkwrap":false},"0.0.2":{"name":"wrap-fn","version":"0.0.2","description":"support sync, async, and generator functions","keywords":["browser","wrap","generator"],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/wrap-fn.git"},"dependencies":{"co":"3.1.0"},"devDependencies":{"duo":"^0.8.2","duo-test":"^0.3.2","generator-support":"0.0.1","gnode":"0.0.8","mocha":"*","should":"*"},"main":"index","bugs":{"url":"https://github.com/MatthewMueller/wrap-fn/issues"},"homepage":"https://github.com/MatthewMueller/wrap-fn","_id":"wrap-fn@0.0.2","_shasum":"1592f3c5cd5e82c305262c2a9e4931b09aa6581f","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"1592f3c5cd5e82c305262c2a9e4931b09aa6581f","size":19804,"noattachment":false,"key":"/wrap-fn/-/wrap-fn-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrap-fn/download/wrap-fn-0.0.2.tgz"},"directories":{},"publish_time":1409541713148,"_cnpm_publish_time":1409541713148,"_hasShrinkwrap":false},"0.0.1":{"name":"wrap-fn","version":"0.0.1","description":"support sync, async, and generator functions","keywords":["browser","wrap","generator"],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/wrap-fn.git"},"dependencies":{"co":"3.1.0"},"devDependencies":{"duo":"^0.8.2","duo-test":"^0.3.2","generator-support":"0.0.1","gnode":"0.0.8","mocha":"*","should":"*"},"main":"index","bugs":{"url":"https://github.com/MatthewMueller/wrap-fn/issues"},"homepage":"https://github.com/MatthewMueller/wrap-fn","_id":"wrap-fn@0.0.1","_shasum":"724e833f76b1f43511f06c5654e8a2267590789d","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"724e833f76b1f43511f06c5654e8a2267590789d","size":19761,"noattachment":false,"key":"/wrap-fn/-/wrap-fn-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrap-fn/download/wrap-fn-0.0.1.tgz"},"directories":{},"publish_time":1409536731665,"_cnpm_publish_time":1409536731665,"_hasShrinkwrap":false}},"readme":"\n**Deprecated in favor of: [wrapped](https://github.com/matthewmueller/wrapped).**\n\n# wrap-fn\n\n  Low-level wrapper to support sync, async, promises, and generator functions.\n\n## Installation\n\nNode:\n\n```bash\n$ npm install wrap-fn\n```\n\nDuo:\n\n```js\nvar wrap = require('matthewmueller/wrap-fn');\n```\n\n## Example\n\n```js\nfunction *fn(a, b) {\n  yield wait(100);\n  // ...\n}\n\nfunction next(err) {\n  // Called after\n}\n\nwrap(fn, next)('a', 'b')\n```\n\n## API\n\n### `wrap(fn, [done])([args, ...])`\n\nWrap `fn` to support sync, async, promises and generator functions. Call `done` when finished.\n\n`wrap` returns a function which you can pass arguments to or set the context.\n\n```js\nwrap(fn).call(user, a, b, c, d);\n```\n\n## Test\n\n```js\nnpm install\nmake test\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014 Matthew Mueller &lt;mattmuelle@gmail.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_attachments":{},"homepage":"https://github.com/matthewmueller/wrap-fn#readme","bugs":{"url":"https://github.com/matthewmueller/wrap-fn/issues"},"license":"MIT"}