{"_id":"nextback","_rev":"67147","name":"nextback","description":"Wraps callbacks in async","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"fractal","email":"contact@wearefractal.com"}],"time":{"modified":"2021-06-03T10:22:23.000Z","created":"2013-09-30T23:01:56.356Z","0.1.0":"2014-03-21T16:17:35.740Z","0.0.1":"2013-09-30T23:01:56.356Z"},"users":{"conradz":true},"author":{"name":"Fractal","email":"contact@wearefractal.com","url":"http://wearefractal.com/"},"repository":{"type":"git","url":"git://github.com/wearefractal/nextback.git"},"versions":{"0.1.0":{"name":"nextback","description":"Wraps callbacks in async","version":"0.1.0","homepage":"http://github.com/wearefractal/nextback","repository":{"type":"git","url":"git://github.com/wearefractal/nextback.git"},"author":{"name":"Fractal","email":"contact@wearefractal.com","url":"http://wearefractal.com/"},"main":"./index.js","devDependencies":{"mocha":"^1.18.2","should":"^3.2.0-beta1"},"scripts":{"test":"mocha"},"engines":{"node":">= 0.4.0"},"licenses":[{"type":"MIT","url":"http://github.com/wearefractal/nextback/raw/master/LICENSE"}],"bugs":{"url":"https://github.com/wearefractal/nextback/issues"},"_id":"nextback@0.1.0","dist":{"shasum":"8713831b62ebed7039daa3f3d39bd3af5eb1b476","size":2135,"noattachment":false,"key":"/nextback/-/nextback-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nextback/download/nextback-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"fractal","email":"contact@wearefractal.com"},"maintainers":[{"name":"fractal","email":"contact@wearefractal.com"}],"directories":{},"publish_time":1395418655740,"_hasShrinkwrap":false,"_cnpm_publish_time":1395418655740},"0.0.1":{"name":"nextback","description":"Wraps callbacks in async","version":"0.0.1","homepage":"http://github.com/wearefractal/nextback","repository":{"type":"git","url":"git://github.com/wearefractal/nextback.git"},"author":{"name":"Fractal","email":"contact@wearefractal.com","url":"http://wearefractal.com/"},"main":"./index.js","devDependencies":{"mocha":"*","should":"*"},"scripts":{"test":"mocha"},"engines":{"node":">= 0.4.0"},"licenses":[{"type":"MIT","url":"http://github.com/wearefractal/nextback/raw/master/LICENSE"}],"bugs":{"url":"https://github.com/wearefractal/nextback/issues"},"_id":"nextback@0.0.1","dist":{"shasum":"e7f78d900528a7e399e2b1fe220dbc8c8520948d","size":2056,"noattachment":false,"key":"/nextback/-/nextback-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/nextback/download/nextback-0.0.1.tgz"},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"fractal","email":"contact@wearefractal.com"},"maintainers":[{"name":"fractal","email":"contact@wearefractal.com"}],"directories":{},"publish_time":1380582116356,"_hasShrinkwrap":false,"_cnpm_publish_time":1380582116356}},"readme":"[![Build Status](https://travis-ci.org/wearefractal/nextback.png?branch=master)](https://travis-ci.org/wearefractal/nextback)\n\n[![NPM version](https://badge.fury.io/js/nextback.png)](http://badge.fury.io/js/nextback)\n\n## Information\n\n<table>\n<tr> \n<td>Package</td><td>nextback</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>Wraps callbacks in async</td>\n</tr>\n<tr>\n<td>Node Version</td>\n<td>>= 0.4</td>\n</tr>\n</table>\n\n## What\n\n`nextback` makes sure your callbacks don't return immediately by wrapping them in a setImmediate or nextTick.\n\n## What you shouldn't do\n\n```javascript\nvar doAsync = function(cb) {\n  if (somethingIsWrong) {\n    return cb(new Error(\"Crap\"));\n  }\n  doWork(function(data){\n    cb(null, data);\n  });\n};\n```\n\n## What you should do\n\n```javascript\nvar nextback = require('nextback');\n\nvar doAsync = function(cb) {\n  cb = nextback(cb);\n\n  if (somethingIsWrong) {\n    return cb(new Error(\"Crap\"));\n  }\n  doWork(function(data){\n    cb(null, data);\n  });\n};\n```\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Fractal <contact@wearefractal.com>\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\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_attachments":{},"homepage":"http://github.com/wearefractal/nextback","bugs":{"url":"https://github.com/wearefractal/nextback/issues"}}