{"_id":"raw-stacktrace","_rev":"303926","name":"raw-stacktrace","description":"Emit and/or format raw stacktraces when errors are thrown","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"jb55","email":"bill@casarin.me"}],"time":{"modified":"2021-06-03T19:25:11.000Z","created":"2012-03-15T17:32:35.473Z","1.0.3":"2014-04-08T21:34:37.388Z","1.0.2":"2014-04-08T20:51:42.612Z","1.0.1":"2014-04-08T20:44:49.909Z","1.0.0":"2013-09-02T22:13:58.743Z","0.0.2":"2012-03-15T17:35:35.236Z","0.0.1":"2012-03-15T17:32:35.473Z"},"users":{},"repository":{"type":"git","url":"git://github.com/jb55/node-raw-stacktrace.git"},"versions":{"1.0.3":{"name":"raw-stacktrace","description":"Emit and/or format raw stacktraces when errors are thrown","keywords":["stacktrace","trace","callsite","callsites"],"version":"1.0.3","repository":{"type":"git","url":"git://github.com/jb55/node-raw-stacktrace.git"},"main":"index.js","scripts":{"test":"mocha --reporter spec"},"dependencies":{"traceback":">=0.3.0 && <0.4.0"},"devDependencies":{"mocha":"*","better-assert":"*"},"bugs":{"url":"https://github.com/jb55/node-raw-stacktrace/issues"},"homepage":"https://github.com/jb55/node-raw-stacktrace","_id":"raw-stacktrace@1.0.3","dist":{"shasum":"c824232e0b17e57a3e126af69db8725217bd08f6","size":3103,"noattachment":false,"key":"/raw-stacktrace/-/raw-stacktrace-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/raw-stacktrace/download/raw-stacktrace-1.0.3.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"jb55","email":"bill@casarin.me"},"maintainers":[{"name":"jb55","email":"bill@casarin.me"}],"directories":{},"publish_time":1396992877388,"_cnpm_publish_time":1396992877388,"_hasShrinkwrap":false},"1.0.2":{"name":"raw-stacktrace","description":"Emit and/or format raw stacktraces when errors are thrown","keywords":["stacktrace","trace","callsite","callsites"],"version":"1.0.2","repository":{"type":"git","url":"git://github.com/jb55/node-raw-stacktrace.git"},"main":"index.js","scripts":{"test":"mocha --reporter spec"},"dependencies":{"traceback":"^0.3.0"},"devDependencies":{"mocha":"*","better-assert":"*"},"bugs":{"url":"https://github.com/jb55/node-raw-stacktrace/issues"},"homepage":"https://github.com/jb55/node-raw-stacktrace","_id":"raw-stacktrace@1.0.2","dist":{"shasum":"0cfb93f225479902d9e5a9a2e6a24293057c412a","size":3086,"noattachment":false,"key":"/raw-stacktrace/-/raw-stacktrace-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/raw-stacktrace/download/raw-stacktrace-1.0.2.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"jb55","email":"bill@casarin.me"},"maintainers":[{"name":"jb55","email":"bill@casarin.me"}],"directories":{},"publish_time":1396990302612,"_cnpm_publish_time":1396990302612,"_hasShrinkwrap":false},"1.0.1":{"name":"raw-stacktrace","description":"Emit and/or format raw stacktraces when errors are thrown","keywords":["stacktrace","trace","callsite","callsites"],"version":"1.0.1","repository":{"type":"git","url":"git://github.com/jb55/node-raw-stacktrace.git"},"main":"index.js","scripts":{"test":"mocha --reporter spec"},"dependencies":{},"devDependencies":{"mocha":"*","better-assert":"*"},"bugs":{"url":"https://github.com/jb55/node-raw-stacktrace/issues"},"homepage":"https://github.com/jb55/node-raw-stacktrace","_id":"raw-stacktrace@1.0.1","dist":{"shasum":"2ff7020a56738d4727cf81a93b4843e9cd52ba07","size":3028,"noattachment":false,"key":"/raw-stacktrace/-/raw-stacktrace-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/raw-stacktrace/download/raw-stacktrace-1.0.1.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"jb55","email":"bill@casarin.me"},"maintainers":[{"name":"jb55","email":"bill@casarin.me"}],"directories":{},"publish_time":1396989889909,"_cnpm_publish_time":1396989889909,"_hasShrinkwrap":false},"1.0.0":{"author":{"name":"William Casarin","email":"will@casarin.ca"},"name":"raw-stacktrace","description":"Emit raw stacktraces when errors are thrown","version":"1.0.0","repository":{"url":""},"main":"index.js","engines":{"node":"~0.6.8"},"dependencies":{"traceback":">=0.3.0 && < 0.4","underscore":"*"},"devDependencies":{},"optionalDependencies":{},"readmeFilename":"Readme.md","_id":"raw-stacktrace@1.0.0","dist":{"shasum":"f308881f17667785a9acd7c8fbd442e1b2acf1db","size":2697,"noattachment":false,"key":"/raw-stacktrace/-/raw-stacktrace-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/raw-stacktrace/download/raw-stacktrace-1.0.0.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"jb55","email":"bill@casarin.ca"},"maintainers":[{"name":"jb55","email":"bill@casarin.me"}],"directories":{},"publish_time":1378160038743,"_cnpm_publish_time":1378160038743,"_hasShrinkwrap":false},"0.0.2":{"author":{"name":"Bill Casarin","email":"bill@casarin.ca"},"name":"raw-stacktrace","description":"Emit raw stacktraces when errors are thrown","version":"0.0.2","repository":{"url":""},"main":"index.js","engines":{"node":"~0.6.8"},"dependencies":{"traceback":">=0.3.0 && < 0.4","underscore":"*"},"devDependencies":{},"optionalDependencies":{},"_npmUser":{"name":"jb55","email":"bill@casarin.ca"},"_id":"raw-stacktrace@0.0.2","_engineSupported":true,"_npmVersion":"1.1.0-2","_nodeVersion":"v0.6.8","_defaultsLoaded":true,"dist":{"shasum":"441a017861be47e6ddd7421788f095333500a648","size":1601,"noattachment":false,"key":"/raw-stacktrace/-/raw-stacktrace-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/raw-stacktrace/download/raw-stacktrace-0.0.2.tgz"},"maintainers":[{"name":"jb55","email":"bill@casarin.me"}],"directories":{},"publish_time":1331832935236,"_cnpm_publish_time":1331832935236,"_hasShrinkwrap":false},"0.0.1":{"author":{"name":"Bill Casarin","email":"bill@casarin.ca"},"name":"raw-stacktrace","description":"Emit raw stacktraces when errors are thrown","version":"0.0.1","repository":{"url":""},"main":"index.js","engines":{"node":"~0.6.8"},"dependencies":{"traceback":">=0.3.0 && < 0.4","underscore":"*"},"devDependencies":{},"optionalDependencies":{},"_npmUser":{"name":"jb55","email":"bill@casarin.ca"},"_id":"raw-stacktrace@0.0.1","_engineSupported":true,"_npmVersion":"1.1.0-2","_nodeVersion":"v0.6.8","_defaultsLoaded":true,"dist":{"shasum":"3c0439cd451a3bf6a6eef9c8249c31e76d7e9021","size":1556,"noattachment":false,"key":"/raw-stacktrace/-/raw-stacktrace-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/raw-stacktrace/download/raw-stacktrace-0.0.1.tgz"},"maintainers":[{"name":"jb55","email":"bill@casarin.me"}],"directories":{},"publish_time":1331832755473,"_cnpm_publish_time":1331832755473,"_hasShrinkwrap":false}},"readme":"\n# node-raw-stacktraces\n\nGet raw stack traces when errors are thrown.\n\nOptionally customize the format of stack traces.\n\n[![Build Status](https://travis-ci.org/jb55/node-raw-stacktrace.png)](https://travis-ci.org/jb55/node-raw-stacktrace)\n\n## How it works\n\nnode-raw-stacktrace works by hooking into v8's prepareStackTrace call. v8 calls\nthis function when code accesses the Error.stack property to render it to a\nstring.\n\nThis means that Error.stack needs to be accessed or events will not be emitted.\nUsually this is not an issue if it gets logged to a file or stdout, but it's\nsomething to keep in mind.\n\n## methods\n\n```js\nvar raw = require('raw-stacktrace');\n```\n\n### var traces = raw(opts={})\n\nReturn an `EventEmitter` that emits an array of either raw or formatted\nCallSites. You can read about v8's [CallSite API here](http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi#Customizing_stack_traces)\n\n`opts` may contain:\n\n* `rawCallSites`: `true` if you just want the raw array of callsites,\n  defaults to `false`. When `false`, the callsites are formatted to objects.\n\n* `formatter`: \\[optional\\] a `function(err, callsites)` that formats stack\n  traces, usually returns a string but it doesn't have to.\n\n## Example\n\n```js\nvar raw = require('raw-stacktrace');\nvar traces = raw();\n\ntraces.on(\"trace\", function(err, callsites){\n  console.log(callsites[0]);\n});\n\ntraces.formatter(function(err, callsites){\n  return \"custom stack trace output\";\n});\n\n(function testError(){ \n  throw new Error(\"test\");\n}).bind({ context: \"someContext\" })();\n```\n\n### Output\n\n```js\n{ this: { context: 'someContext' },\n  type: 'Object',\n  isTop: false,\n  isEval: false,\n  origin: '/Users/jb55/src/js/node-raw-stacktrace/example.js',\n  script: '/Users/jb55/src/js/node-raw-stacktrace/example.js',\n  fun: [Function: testError],\n  name: 'testError',\n  method: null,\n  path: '/Users/jb55/src/js/node-raw-stacktrace/example.js',\n  line: 11,\n  col: 9,\n  isNative: false,\n  pos: 277,\n  isCtor: false,\n  file: 'example.js',\n  toJSON: [Function: toJSON] }\ncustom stack trace output\n```\n\n## Adding callsites to the Error object\n\n```js\nvar raw = require('raw-stacktrace');\nvar traces = raw();\n\ntraces.on(\"trace\", function(err, callsites){\n  err.callsites = callsites;\n});\n```\n\n### License\n\n```\nThe MIT License (MIT)\n\nCopyright (c) 2013 William Casarin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","_attachments":{},"homepage":"https://github.com/jb55/node-raw-stacktrace","bugs":{"url":"https://github.com/jb55/node-raw-stacktrace/issues"}}