{
  "name": "async-listener",
  "version": "0.5.6",
  "description": "Polyfill exporting trevnorris's 0.11+ asyncListener API.",
  "author": {
    "name": "Forrest L Norvell",
    "email": "ogd@aoaioxxysz.net"
  },
  "contributors": [
    {
      "name": "Tim Caswell",
      "email": "tim@creationix.com"
    },
    {
      "name": "Forrest L Norvell",
      "email": "ogd@aoaioxxysz.net"
    }
  ],
  "main": "index.js",
  "scripts": {
    "test": "tap test/*.tap.js"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/othiym23/async-listener.git"
  },
  "keywords": [
    "polyfill",
    "shim",
    "zesty",
    "crazed",
    "experimental"
  ],
  "license": "BSD-2-Clause",
  "bugs": {
    "url": "https://github.com/othiym23/async-listener/issues"
  },
  "engines": {
    "node": "<=0.11.8 || >0.11.10"
  },
  "dependencies": {
    "shimmer": "1.0.0"
  },
  "devDependencies": {
    "tap": "^0.7.1"
  },
  "readme": "[![NPM](https://nodei.co/npm/async-listener.png?downloads=true&stars=true)](https://nodei.co/npm/async-listener/)\n\n# process.addAsyncListener polyfill\n\nThis is an implementation of Trevor Norris's\nprocess.{addAsyncListener,removeAsyncListener} API for adding behavior to async\ncalls. You can see his implementation (currently a work in progress) on\n[Node.js core pull request #6011](https://github.com/joyent/node/pull/6011).\nThis polyfill / shim is intended for use in versions of Node prior to whatever\nversion of Node in which Trevor's changes finally land (anticipated at the time\nof this writing as 0.11.7).\n\nHere's his documentation of the intended API, which will probably get cleaned up\nhere later:\n\n## createAsyncListener(callbacks[, initialStorage])\n\n* `callbacks` {Object}\n* `initialStorage` {Value}\n\nReturns a constructed `AsyncListener` object. Which can then be passed to\n`process.addAsyncListener()` and `process.removeAsyncListener()`. Each\nfunction parameter is as follows:\n\n1. `callbacks`: An `Object` which may contain four optional fields:\n   * `create`: A `function (storage)` that is called when an asynchronous event\n     is queued. Recives the `storage` attached to the listner. `storage` can be\n     created by passing an `initialStorage` argument during costruction, or by\n     returning a `Value` from `create` which will be attached to the listner\n     and overwrite the `initialStorage`.\n   * `before`: A `function (context, storage)` that is called immediately\n     before the asynchronous callback is about to run. It will be passed both\n     the `context` (i.e. `this`) of the calling function and the `storage`.\n   * `after`: A `function (context, storage)` called immediately after the\n     asynchronous event's callback is run. Note that if the event's callback\n     throws during execution this will not be called.\n   * `error`: A `function (storage, error)` called if the event's callback\n     threw. If `error` returns `true` then Node will assume the error has been\n     properly handled and resume execution normally.\n1. `initialStorage`: A `Value` (i.e. anything) that will be, by default,\n   attached to all new event instances. This will be overwritten if a `Value`\n   is returned by `create()`.\n\n\n## addAsyncListener(callbacks[, initialStorage])\n## addAsyncListener(asyncListener)\n\nReturns a constructed `AsyncListener` object and immediately adds it to the\nlistening queue.\n\n## removeAsyncListener(asyncListener)\n\nRemoves the `asyncListener` from the listening queue.\n",
  "readmeFilename": "README.md",
  "homepage": "https://github.com/othiym23/async-listener",
  "_id": "async-listener@0.5.6",
  "_shasum": "0c5f7dfb7d5ba657098f3ca5d7be693f720e09f9",
  "_from": "async-listener@^0.5.0",
  "_resolved": "https://registry.npmjs.org/async-listener/-/async-listener-0.5.6.tgz"
}
