{"_id":"stack-chain","_rev":"372835","name":"stack-chain","description":"API for combining call site modifiers","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"andreasmadsen","email":""}],"time":{"modified":"2021-07-27T02:44:12.000Z","created":"2012-09-29T16:01:24.307Z","2.0.0":"2017-09-23T20:42:55.494Z","1.3.7":"2016-03-14T14:14:54.583Z","1.3.6":"2016-02-10T13:49:54.774Z","1.3.5":"2015-11-19T19:49:14.143Z","1.3.4":"2015-10-29T21:56:59.618Z","1.3.3":"2015-09-02T13:10:39.120Z","1.3.2":"2015-05-11T18:11:17.916Z","1.3.1":"2015-01-31T14:02:23.374Z","1.3.0":"2014-10-22T21:03:24.311Z","1.2.0":"2014-09-10T15:32:42.085Z","1.1.1":"2014-09-10T12:50:24.581Z","1.1.0":"2014-09-06T12:52:43.683Z","1.0.0":"2014-01-03T18:39:43.024Z","0.3.0":"2013-09-02T14:35:27.180Z","0.2.0":"2012-09-29T16:01:24.307Z"},"users":{},"author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"versions":{"2.0.0":{"name":"stack-chain","description":"API for combining call site modifiers","version":"2.0.0","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"scripts":{"test":"tap ./test/simple/*"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"2.x.x","uglify-js":"2.5.x"},"license":"MIT","gitHead":"45601a3bef246c89b3d43ea70066bcaba257a64c","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain#readme","_id":"stack-chain@2.0.0","_npmVersion":"5.3.0","_nodeVersion":"9.0.0-pre","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"dist":{"shasum":"d73d1172af89565f07438b5bcc086831b6689b2d","size":8600,"noattachment":false,"key":"/stack-chain/-/stack-chain-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-2.0.0.tgz"},"maintainers":[{"name":"andreasmadsen","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stack-chain-2.0.0.tgz_1506199374563_0.8389039456378669"},"directories":{},"publish_time":1506199375494,"_hasShrinkwrap":false,"_cnpm_publish_time":1506199375494},"1.3.7":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.3.7","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"2.x.x","uglify-js":"2.5.x"},"license":"MIT","gitHead":"2445f95c5ffdfc9da36703da1be236745bb4a26e","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain#readme","_id":"stack-chain@1.3.7","_shasum":"d192c9ff4ea6a22c94c4dd459171e3f00cea1285","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.1","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"dist":{"shasum":"d192c9ff4ea6a22c94c4dd459171e3f00cea1285","size":8801,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.3.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.3.7.tgz"},"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/stack-chain-1.3.7.tgz_1457964892201_0.46984840696677566"},"directories":{},"publish_time":1457964894583,"_cnpm_publish_time":1457964894583,"_hasShrinkwrap":false},"1.3.6":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.3.6","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"2.x.x","uglify-js":"2.5.x"},"license":"MIT","gitHead":"9dcfd1399b0ab3f88db7a19db6f5af3c9340e341","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain#readme","_id":"stack-chain@1.3.6","_shasum":"0e341f31ad0a7f9a4ea35b94cab46898bd5a6a9f","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"dist":{"shasum":"0e341f31ad0a7f9a4ea35b94cab46898bd5a6a9f","size":8622,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.3.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.3.6.tgz"},"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/stack-chain-1.3.6.tgz_1455112191667_0.03577118902467191"},"directories":{},"publish_time":1455112194774,"_cnpm_publish_time":1455112194774,"_hasShrinkwrap":false},"1.3.5":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.3.5","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"2.x.x","uglify-js":"2.5.x"},"license":"MIT","gitHead":"e51a7b2e0f0d1c79b1c4c7962dc53abbeef48e9e","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain#readme","_id":"stack-chain@1.3.5","_shasum":"02a64a5fe92250d41984d55961a3b2d466a14d8a","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"dist":{"shasum":"02a64a5fe92250d41984d55961a3b2d466a14d8a","size":8077,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.3.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.3.5.tgz"},"directories":{},"publish_time":1447962554143,"_cnpm_publish_time":1447962554143,"_hasShrinkwrap":false},"1.3.4":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.3.4","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"2.x.x","uglify-js":"2.5.x"},"license":"MIT","gitHead":"c7065ea495035ec54d4caf467c15aaebea753cd1","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain#readme","_id":"stack-chain@1.3.4","_shasum":"2db97b8e5d738ada13851a6d8902b379085770b4","_from":".","_npmVersion":"2.14.7","_nodeVersion":"5.0.0-pre","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"dist":{"shasum":"2db97b8e5d738ada13851a6d8902b379085770b4","size":7822,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.3.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.3.4.tgz"},"directories":{},"publish_time":1446155819618,"_cnpm_publish_time":1446155819618,"_hasShrinkwrap":false},"1.3.3":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.3.3","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./stack-chain.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"0.4.x"},"license":"MIT","gitHead":"d3e7d1f63ce47e98ced5cebb2d85e7984df412a5","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain#readme","_id":"stack-chain@1.3.3","_shasum":"f29669162bd3e3435733337101bbdaea1cde831a","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.1.0","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"dist":{"shasum":"f29669162bd3e3435733337101bbdaea1cde831a","size":7711,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.3.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.3.3.tgz"},"directories":{},"publish_time":1441199439120,"_cnpm_publish_time":1441199439120,"_hasShrinkwrap":false},"1.3.2":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.3.2","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./stack-chain.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"0.4.x"},"license":"MIT","gitHead":"e5e3c4e20938f43620764ef57e17b2cbbb5af0e9","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain#readme","_id":"stack-chain@1.3.2","_shasum":"ef567d924725c310d483877648908176d36f811a","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.1","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"dist":{"shasum":"ef567d924725c310d483877648908176d36f811a","size":7690,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.3.2.tgz"},"directories":{},"publish_time":1431367877916,"_cnpm_publish_time":1431367877916,"_hasShrinkwrap":false},"1.3.1":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.3.1","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./stack-chain.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"0.4.x"},"license":"MIT","gitHead":"5686c81b1b15d0d3040e74844ff2cb0a87eabe1c","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain","_id":"stack-chain@1.3.1","_shasum":"1f4d7ca3aa0ff900d080df900e24f4c62b7180d4","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"dist":{"shasum":"1f4d7ca3aa0ff900d080df900e24f4c62b7180d4","size":7714,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.3.1.tgz"},"directories":{},"publish_time":1422712943374,"_cnpm_publish_time":1422712943374,"_hasShrinkwrap":false},"1.3.0":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.3.0","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./stack-chain.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"0.4.x"},"license":"MIT","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain","_id":"stack-chain@1.3.0","_shasum":"11c9a9f61a33af61fdcad698f1d70646c1ca6ffb","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"dist":{"shasum":"11c9a9f61a33af61fdcad698f1d70646c1ca6ffb","size":7709,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.3.0.tgz"},"directories":{},"publish_time":1414011804311,"_cnpm_publish_time":1414011804311,"_hasShrinkwrap":false},"1.2.0":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.2.0","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./stack-chain.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"0.4.x"},"license":"MIT","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain","_id":"stack-chain@1.2.0","_shasum":"78b3a266b570b830399920324f9912227b58d5dc","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"dist":{"shasum":"78b3a266b570b830399920324f9912227b58d5dc","size":7055,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.2.0.tgz"},"directories":{},"publish_time":1410363162085,"_cnpm_publish_time":1410363162085,"_hasShrinkwrap":false},"1.1.1":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.1.1","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./stack-chain.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"0.4.x"},"license":"MIT","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain","_id":"stack-chain@1.1.1","_shasum":"aaa07c9f46ca7ccb4353e08c03aa74749d78dc13","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"dist":{"shasum":"aaa07c9f46ca7ccb4353e08c03aa74749d78dc13","size":6296,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.1.1.tgz"},"directories":{},"publish_time":1410353424581,"_cnpm_publish_time":1410353424581,"_hasShrinkwrap":false},"1.1.0":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.1.0","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./stack-chain.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"0.4.x"},"license":"MIT","engines":{"node":"0.10 || 0.11 || 0.12"},"bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain","_id":"stack-chain@1.1.0","dist":{"shasum":"1d4eebc9f2c6f889a7ff9a098d9322aa14911d98","size":6020,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"directories":{},"publish_time":1410007963683,"_cnpm_publish_time":1410007963683,"_hasShrinkwrap":false},"1.0.0":{"name":"stack-chain","description":"API for combining call site modifiers","version":"1.0.0","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./stack-chain.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"0.4.x"},"license":"MIT","engines":{"node":"0.10 || 0.11 || 0.12"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"homepage":"https://github.com/AndreasMadsen/stack-chain","_id":"stack-chain@1.0.0","dist":{"shasum":"ff50e36f94a31ac380e672fa25c66af8997f5563","size":5272,"noattachment":false,"key":"/stack-chain/-/stack-chain-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"directories":{},"publish_time":1388774383024,"_cnpm_publish_time":1388774383024,"_hasShrinkwrap":false},"0.3.0":{"name":"stack-chain","description":"API for combining call site modifiers","version":"0.3.0","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./stack-chain.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"0.4.x"},"license":"MIT","engines":{"node":"0.10 || 0.11","npm":"1"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"_id":"stack-chain@0.3.0","dist":{"shasum":"b47e449c4090595ccf0d1e6531a5090b82ca2ffb","size":4631,"noattachment":false,"key":"/stack-chain/-/stack-chain-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-0.3.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"directories":{},"publish_time":1378132527180,"_cnpm_publish_time":1378132527180,"_hasShrinkwrap":false},"0.2.0":{"name":"stack-chain","description":"API for combining call site modifiers","version":"0.2.0","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./stack-chain.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/stack-chain.git"},"keywords":["stack","chain","trace","call site","concat","format"],"devDependencies":{"tap":"0.3.x"},"license":"MIT","engines":{"node":"0.8","npm":"1"},"_id":"stack-chain@0.2.0","dist":{"shasum":"0cd0f3248fd25cfc442fb45232538e2b353c54da","size":4670,"noattachment":false,"key":"/stack-chain/-/stack-chain-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-chain/download/stack-chain-0.2.0.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":""}],"directories":{},"publish_time":1348934484307,"_cnpm_publish_time":1348934484307,"_hasShrinkwrap":false}},"readme":"# stack-chain [![Build Status](https://secure.travis-ci.org/AndreasMadsen/stack-chain.png)](http://travis-ci.org/AndreasMadsen/stack-chain)\n\n> API for combining call site modifyers\n\n## Installation\n\n```sheel\nnpm install stack-chain\n```\n## API documentation\n\n```JavaScript\nvar chain = require('stack-chain');\n```\n\nWhen the `Error.stack` getter is executed, the `stack-chain` will perform the\nfollowing:\n\n1. execute the `modifiers` attached by `chain.extend`.\n2. execute the `modifiers` attached by `chain.filter`.\n3. execute the `formater` set by `chain.format.replace`.\n\n### chain.extend.attach(modifier)\n### chain.filter.attach(modifier)\n\nWill modify the callSite array. Note you shouldn't format the stack trace.\n\nThe `modifier` is a function there takes two arguments `error` and `frames`.\n\n* `error` is the `Error` object.\n* `frames` is an array of `callSite` objects, see\n  [v8 documentation](https://github.com/v8/v8/wiki/Stack-Trace-API)\n  for details.\n\nWhen the `modifier` is done, it should `return` a modified `frames` array.\n\n```JavaScript\nchain.filter.attach(function (error, frames) {\n\n    // Filter out traces related to this file\n    var rewrite = frames.filter(function (callSite) {\n      return callSite.getFileName() !== module.filename;\n    });\n\n    return rewrite;\n});\n```\n\n### chain.extend.deattach(modifier)\n### chain.filter.deattach(modifier)\n\nRemoves a `modifier` function from the list of `modifiers`.\n\n```JavaScript\nvar modifier = function () {};\n\n// Attach modifier function\nchain.extend.attach(modifier);\n\n// Deattach modifier function\nchain.extend.deattach(modifier);\n```\n\n### chain.format.replace(formater)\n\nReplaces the default v8 `formater`. The new `formater` takes a two arguments\n`error` and `frames`.\n\n* `error` is the `Error` object.\n* `callSites` is an array of `callSite` objects, see\n  [v8 documentation](https://github.com/v8/v8/wiki/Stack-Trace-API)\n  for details.\n\nWhen the `formater` is done, it should `return` a `string`. The `string` will\nwhat `Error.stack` returns.\n\n```JavaScript\nchain.format.replace(function (error, frames) {\n  var lines = [];\n\n  lines.push(error.toString());\n\n  for (var i = 0; i < frames.length; i++) {\n    lines.push(\"    at \" + frames[i].toString());\n  }\n\n  return lines.join(\"\\n\");\n});\n```\n\n### chain.format.restore()\n\nWill restore the default v8 `formater`. Note that dude to the nature of v8\n`Error` objects, if one of the getters `Error.stack` or `Error.callSite` has\nalready executed, the value of `Error.stack` won't change.\n\n### chain.callSite([options])\n\nThis will return the unmodified `callSite` array from the current tick. This\nis a performance shortcut, as it does not require generating the `.stack`\nstring. This behaviour is different from the `Error().callSite` properties.\n\nWhile this is mostly generating `callSite` in hot code, it can be useful to\ndo some modification on the array. The `options` object, supports the following:\n\n```javascript\noptions = {\n  // (default false) run the extenders on the callSite array.\n  extend: true,\n\n  // (default false) run the filters on the callSite array.\n  filter: true,\n\n  // (default 0) before running extend or filter methods, slice of some of the\n  // end. This can be useful for hiding the place from where you called this\n  // function.\n  slice: 2\n}\n```\n\n### chain.originalCallSite(error)\n\nReturns the original `callSite` array.\n\n### chain.mutatedCallSite(error)\n\nReturns the mutated `callSite` array, that is after `extend` and `filter`\nis applied. The array will not exceed the `Error.stackTraceLimit`.\n\n### Error.stackTraceLimit\n\nThis limites the size of the `callSites` array. The default value is 10, and\ncan be set to any positive number including `Infinity`. See\n[v8 documentation](https://github.com/v8/v8/wiki/Stack-Trace-API)\nfor details.\n\n## License\n\n**The software is license under \"MIT\"**\n\n> Copyright (c) 2012 Andreas Madsen\n>\n> Permission is hereby granted, free of charge, to any person obtaining a copy\n> of this software and associated documentation files (the \"Software\"), to deal\n> in the Software without restriction, including without limitation the rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> The above copyright notice and this permission notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n","_attachments":{},"homepage":"https://github.com/AndreasMadsen/stack-chain#readme","bugs":{"url":"https://github.com/AndreasMadsen/stack-chain/issues"},"license":"MIT"}