0.0.1 • Published 12 years ago
parstack v0.0.1
Motiviation
Parses stack traces
Example:
var parstack = require("parstack");
var obj = parstack(new Error("hello\nworld at test"));
console.log(JSON.stringify(obj, null, 2));
Output:
{
"message": "Error: hello\nworld at test",
"stack": [
{
"source": "Object.<anonymous>",
"file": "/Users/craig/Dropbox/Developer/Public/stacktrace2json.js/examples/index.js",
"line": "3",
"col": "19"
},
{
"source": "Module._compile",
"file": "module.js",
"line": "411",
"col": "26"
},
{
"source": "Object..js",
"file": "module.js",
"line": "417",
"col": "10"
},
{
"source": "Module.load",
"file": "module.js",
"line": "343",
"col": "31"
},
{
"source": "Function._load",
"file": "module.js",
"line": "302",
"col": "12"
},
{
"source": "Array.0",
"file": "module.js",
"line": "430",
"col": "10"
},
{
"source": "EventEmitter._tickCallback",
"file": "node.js",
"line": "126",
"col": "26"
}
]
}