{"_id":"wrapped","_rev":"324786","name":"wrapped","description":"consistent interface for ","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"time":{"modified":"2021-06-04T02:11:47.000Z","created":"2015-08-11T21:41:25.085Z","1.0.1":"2016-02-16T09:34:57.922Z","1.0.0":"2015-08-11T21:41:25.085Z"},"users":{"avoronkin":true},"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/matthewmueller/wrapped.git"},"versions":{"1.0.1":{"name":"wrapped","version":"1.0.1","license":"MIT","description":"consistent interface for ","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/wrapped.git"},"dependencies":{"co":"3.1.0","sliced":"^1.0.1"},"devDependencies":{"generator-support":"0.0.1"},"files":["index.js"],"gitHead":"3529c98e892478c779cd3934c014c79b25d88789","bugs":{"url":"https://github.com/matthewmueller/wrapped/issues"},"homepage":"https://github.com/matthewmueller/wrapped#readme","_id":"wrapped@1.0.1","_shasum":"c783d9d807b273e9b01e851680a938c87c907242","_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":"c783d9d807b273e9b01e851680a938c87c907242","size":2378,"noattachment":false,"key":"/wrapped/-/wrapped-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrapped/download/wrapped-1.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/wrapped-1.0.1.tgz_1455615293623_0.9502528954762965"},"directories":{},"publish_time":1455615297922,"_cnpm_publish_time":1455615297922,"_hasShrinkwrap":false},"1.0.0":{"name":"wrapped","version":"1.0.0","license":"MIT","description":"consistent interface for ","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/wrapped.git"},"dependencies":{"co":"3.1.0","sliced":"^1.0.1"},"devDependencies":{"generator-support":"0.0.1"},"files":["index.js"],"gitHead":"2b49b25b6e051d8819d35235f18e396d2c16095c","bugs":{"url":"https://github.com/matthewmueller/wrapped/issues"},"homepage":"https://github.com/matthewmueller/wrapped#readme","_id":"wrapped@1.0.0","_shasum":"1b87f89815105da6ec92ba353eedf3223888c580","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"1b87f89815105da6ec92ba353eedf3223888c580","size":2351,"noattachment":false,"key":"/wrapped/-/wrapped-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrapped/download/wrapped-1.0.0.tgz"},"directories":{},"publish_time":1439329285085,"_cnpm_publish_time":1439329285085,"_hasShrinkwrap":false}},"readme":"\n# wrapped\n\n  Low-level wrapper to provide a consistent interface for sync, async, promises, and generator functions.\n\n  Works with node.js and in the browser.\n\n## Installation\n\nNode:\n\n```bash\n$ npm install wrapped\n```\n\nDuo:\n\n```js\nvar wrap = require('matthewmueller/wrapped');\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\nvar wrap = wrapped(fn)\nwrap('a', 'b', next)\n```\n\n## API\n\n### `wrap(fn)([args, ...], [done])`\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, next);\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/wrapped#readme","bugs":{"url":"https://github.com/matthewmueller/wrapped/issues"},"license":"MIT"}