{"_id":"stack-mapper","_rev":"260020","name":"stack-mapper","description":"Initialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.","dist-tags":{"latest":"0.2.2"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"time":{"modified":"2021-06-03T16:41:42.000Z","created":"2013-12-28T03:54:17.520Z","0.2.2":"2014-01-21T15:33:34.239Z","0.2.1":"2013-12-29T05:02:39.783Z","0.2.0":"2013-12-29T04:52:29.518Z","0.1.6":"2013-12-28T22:21:05.564Z","0.1.5":"2013-12-28T21:50:50.202Z","0.1.4":"2013-12-28T21:36:00.011Z","0.1.3":"2013-12-28T04:43:59.937Z","0.1.2":"2013-12-28T04:19:11.242Z","0.1.1":"2013-12-28T04:15:57.563Z","0.1.0":"2013-12-28T03:54:17.520Z"},"users":{},"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"repository":{"type":"git","url":"git://github.com/thlorenz/stack-mapper.git"},"versions":{"0.2.2":{"name":"stack-mapper","version":"0.2.2","description":"Initialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.","main":"index.js","scripts":{"test":"tape test/*.js test/prepared/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/stack-mapper.git"},"homepage":"https://github.com/thlorenz/stack-mapper","dependencies":{"isarray":"0.0.1","array-map":"0.0.0","foreach-shim":"~0.1.1","source-map-cjs":"~0.1.31"},"devDependencies":{"stack-trace":"~0.0.7","tape":"~1.0.4","convert-source-map":"~0.3.3","browserify":"~3.14.1"},"keywords":["sourcemap","source-map","error","stack","trace","map"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/stack-mapper/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/prepared/*.js","browsers":["ie/6..latest","firefox/22..latest","firefox/nightly","chrome/26..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"bugs":{"url":"https://github.com/thlorenz/stack-mapper/issues"},"_id":"stack-mapper@0.2.2","dist":{"shasum":"789029054937b7d47c1b5b67612cbb1e7cfe7071","size":6502,"noattachment":false,"key":"/stack-mapper/-/stack-mapper-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-mapper/download/stack-mapper-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1390318414239,"_cnpm_publish_time":1390318414239,"_hasShrinkwrap":false},"0.2.1":{"name":"stack-mapper","version":"0.2.1","description":"Initialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.","main":"index.js","scripts":{"test":"tape test/*.js test/prepared/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/stack-mapper.git"},"homepage":"https://github.com/thlorenz/stack-mapper","dependencies":{"isarray":"0.0.1","array-map":"0.0.0","foreach-shim":"~0.1.1","source-map-cjs":"~0.1.31"},"devDependencies":{"stack-trace":"~0.0.7","tape":"~1.0.4","convert-source-map":"~0.3.3","browserify":"~3.14.1"},"keywords":["sourcemap","source-map","error","stack","trace","map"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/stack-mapper/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/prepared/*.js","browsers":["ie/6..latest","firefox/22..latest","firefox/nightly","chrome/26..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/stack-mapper/issues"},"_id":"stack-mapper@0.2.1","dist":{"shasum":"0874995db001a532905a87745394d6276237f3d4","size":6518,"noattachment":false,"key":"/stack-mapper/-/stack-mapper-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-mapper/download/stack-mapper-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1388293359783,"_cnpm_publish_time":1388293359783,"_hasShrinkwrap":false},"0.2.0":{"name":"stack-mapper","version":"0.2.0","description":"Initialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.","main":"index.js","scripts":{"test":"tape test/*.js test/prepared/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/stack-mapper.git"},"homepage":"https://github.com/thlorenz/stack-mapper","dependencies":{"isarray":"0.0.1","array-map":"0.0.0","foreach-shim":"~0.1.1","source-map-cjs":"~0.1.31"},"devDependencies":{"stack-trace":"~0.0.7","tape":"~1.0.4","convert-source-map":"~0.3.3","browserify":"~3.14.1"},"keywords":["sourcemap","source-map","error","stack","trace","map"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/stack-mapper/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/prepared/*.js","browsers":["ie/6..latest","firefox/22..latest","firefox/nightly","chrome/26..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/stack-mapper/issues"},"_id":"stack-mapper@0.2.0","dist":{"shasum":"eaa8bc198e506593755189302e888bd4924324b9","size":6464,"noattachment":false,"key":"/stack-mapper/-/stack-mapper-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-mapper/download/stack-mapper-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1388292749518,"_cnpm_publish_time":1388292749518,"_hasShrinkwrap":false},"0.1.6":{"name":"stack-mapper","version":"0.1.6","description":"Initialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.","main":"index.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/stack-mapper.git"},"homepage":"https://github.com/thlorenz/stack-mapper","dependencies":{"stack-trace":"0.0.7","isarray":"0.0.1","array-map":"0.0.0","foreach-shim":"~0.1.1","source-map-cjs":"~0.1.31"},"devDependencies":{"tape":"~1.0.4","convert-source-map":"~0.3.3","browserify":"~3.14.1","tap":"~0.4.6"},"keywords":["sourcemap","source-map","error","stack","trace","map"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/stack-mapper/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/prepared/*.js","browsers":["ie/6..latest","firefox/22..latest","firefox/nightly","chrome/26..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/stack-mapper/issues"},"_id":"stack-mapper@0.1.6","dist":{"shasum":"394a82e293b63d19d8a3251bed9d7b6f513d1ff4","size":7360,"noattachment":false,"key":"/stack-mapper/-/stack-mapper-0.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-mapper/download/stack-mapper-0.1.6.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1388269265564,"_cnpm_publish_time":1388269265564,"_hasShrinkwrap":false},"0.1.5":{"name":"stack-mapper","version":"0.1.5","description":"Initialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.","main":"index.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/stack-mapper.git"},"homepage":"https://github.com/thlorenz/stack-mapper","dependencies":{"stack-trace":"0.0.7","isarray":"0.0.1","array-map":"0.0.0","foreach-shim":"~0.1.1","source-map-cjs":"~0.1.31"},"devDependencies":{"tape":"~1.0.4","convert-source-map":"~0.3.3","browserify":"~3.14.1","tap":"~0.4.6"},"keywords":["sourcemap","source-map","error","stack","trace","map"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/stack-mapper/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/prepared/*.js","browsers":["ie/6..latest","firefox/22..latest","firefox/nightly","chrome/26..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/stack-mapper/issues"},"_id":"stack-mapper@0.1.5","dist":{"shasum":"1009669ecb87a3d0d65b76570dd32dea49f6ba57","size":7166,"noattachment":false,"key":"/stack-mapper/-/stack-mapper-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-mapper/download/stack-mapper-0.1.5.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1388267450202,"_cnpm_publish_time":1388267450202,"_hasShrinkwrap":false},"0.1.4":{"name":"stack-mapper","version":"0.1.4","description":"Initialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.","main":"index.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/stack-mapper.git"},"homepage":"https://github.com/thlorenz/stack-mapper","dependencies":{"stack-trace":"0.0.7","isarray":"0.0.1","array-map":"0.0.0","foreach-shim":"~0.1.1","source-map-cjs":"~0.1.31"},"devDependencies":{"tape":"~1.0.4","convert-source-map":"~0.3.3","browserify":"~3.14.1","tap":"~0.4.6"},"keywords":["sourcemap","source-map","error","stack","trace","map"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/stack-mapper/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/prepared/*.js","browsers":["ie/6..latest","firefox/22..latest","firefox/nightly","chrome/26..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/stack-mapper/issues"},"_id":"stack-mapper@0.1.4","dist":{"shasum":"9501951c51b962be4414d118f16461551a75801f","size":7089,"noattachment":false,"key":"/stack-mapper/-/stack-mapper-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-mapper/download/stack-mapper-0.1.4.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1388266560011,"_cnpm_publish_time":1388266560011,"_hasShrinkwrap":false},"0.1.3":{"name":"stack-mapper","version":"0.1.3","description":"Initialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.","main":"index.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/stack-mapper.git"},"homepage":"https://github.com/thlorenz/stack-mapper","dependencies":{"stack-trace":"0.0.7","source-map":"~0.1.31"},"devDependencies":{"tape":"~1.0.4","convert-source-map":"~0.3.3","browserify":"~3.14.1","tap":"~0.4.6"},"keywords":["sourcemap","source-map","error","stack","trace","map"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/stack-mapper/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/prepared/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/stack-mapper/issues"},"_id":"stack-mapper@0.1.3","dist":{"shasum":"e89377d96d7f1198feaba8ce5c677a8b357de1d1","size":6803,"noattachment":false,"key":"/stack-mapper/-/stack-mapper-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-mapper/download/stack-mapper-0.1.3.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1388205839937,"_cnpm_publish_time":1388205839937,"_hasShrinkwrap":false},"0.1.2":{"name":"stack-mapper","version":"0.1.2","description":"Initialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.","main":"index.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/stack-mapper.git"},"homepage":"https://github.com/thlorenz/stack-mapper","dependencies":{"stack-trace":"0.0.7","source-map":"~0.1.31"},"devDependencies":{"tape":"~1.0.4","convert-source-map":"~0.3.3","browserify":"~3.14.1","tap":"~0.4.6"},"keywords":["sourcemap","source-map","error","stack","trace","map"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/stack-mapper/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/prepared/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/stack-mapper/issues"},"_id":"stack-mapper@0.1.2","dist":{"shasum":"a010f4955f136cb0dd6082fc6af355e08dd44993","size":6794,"noattachment":false,"key":"/stack-mapper/-/stack-mapper-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-mapper/download/stack-mapper-0.1.2.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1388204351242,"_cnpm_publish_time":1388204351242,"_hasShrinkwrap":false},"0.1.1":{"name":"stack-mapper","version":"0.1.1","description":"Initialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.","main":"index.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/stack-mapper.git"},"homepage":"https://github.com/thlorenz/stack-mapper","dependencies":{"stack-trace":"0.0.7","source-map":"~0.1.31"},"devDependencies":{"tape":"~1.0.4","convert-source-map":"~0.3.3","browserify":"~3.14.1","tap":"~0.4.6"},"keywords":["sourcemap","source-map","error","stack","trace","map"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/stack-mapper/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/prepared/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/stack-mapper/issues"},"_id":"stack-mapper@0.1.1","dist":{"shasum":"5966b77360bc69664abc9c9ac70aa3e66d8eafac","size":6776,"noattachment":false,"key":"/stack-mapper/-/stack-mapper-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-mapper/download/stack-mapper-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1388204157563,"_cnpm_publish_time":1388204157563,"_hasShrinkwrap":false},"0.1.0":{"name":"stack-mapper","version":"0.1.0","description":"Initialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.","main":"index.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/stack-mapper.git"},"homepage":"https://github.com/thlorenz/stack-mapper","dependencies":{"stack-trace":"0.0.7","source-map":"~0.1.31"},"devDependencies":{"tape":"~1.0.4","convert-source-map":"~0.3.3","browserify":"~3.14.1","tap":"~0.4.6"},"keywords":[],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/stack-mapper/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/prepared/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/stack-mapper/issues"},"_id":"stack-mapper@0.1.0","dist":{"shasum":"0f8cdedf5e2799db35349c9f9d910cf685417688","size":7361,"noattachment":false,"key":"/stack-mapper/-/stack-mapper-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stack-mapper/download/stack-mapper-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1388202857520,"_cnpm_publish_time":1388202857520,"_hasShrinkwrap":false}},"readme":"# stack-mapper [![build status](https://secure.travis-ci.org/thlorenz/stack-mapper.png)](http://travis-ci.org/thlorenz/stack-mapper)\n\n[![testling badge](https://ci.testling.com/thlorenz/stack-mapper.png)](https://ci.testling.com/thlorenz/stack-mapper)\n\nInitialize it with a source map, then feed it error stacks to have the trace locations mapped to the original files.\n\n```js\nvar stackMapper = require('stack-mapper');\n\n// it is up to you to create stack-mapper compatible frame objects\n// this will depend on your environment\nvar inframes = [{\n  filename: '/full/path/to/bundle.js',\n  line: 5,\n  column: 10\n}, {\n  filename: '/full/path/to/bundle.js',\n  line: 9,\n  column: 10\n}, {\n  filename: '/full/path/to/bundle.js',\n  line: 20,\n  column: 12\n}, {\n  filename: '/full/path/to/bundle.js',\n  line: 22,\n  column: 10,\n}, {\n  filename: '/Users/thlorenz/dev/js/projects/stack-mapper/test/twofiles.js',\n  line: 18,\n  column: 21\n}];\n\nvar map = { version: 3,\n  file: 'generated.js',\n  sources:\n   [ '/Users/thlorenz/dev/js/projects/stack-mapper/test/twofiles/barbar.js',\n     '/Users/thlorenz/dev/js/projects/stack-mapper/test/twofiles/main.js' ],\n  names: [],\n  mappings: ';AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA',\n  sourcesContent:\n   [ '\\'use strict\\';\\n\\nfunction foobar() {\\n  return new Error();\\n}\\n\\nvar go = module.exports = function () {\\n  return foobar();  \\n};\\n',\n     '\\'use strict\\';\\n\\nvar barbar = require(\\'./barbar\\');\\n\\nmodule.exports = function main() {\\n  var a = 1;\\n  function bar() {\\n    return barbar();\\n  }\\n  return bar();\\n}\\n' ] }\n\nvar sm = stackMapper(map);\nvar frames = sm.map(inframes);\n\nconsole.log(frames);\n```\n\n#### Output\n\n```\n[{\n    filename: '/Users/thlorenz/dev/js/projects/stack-mapper/test/twofiles/barbar.js',\n    line: 4,\n    column: 10\n}, {\n    filename: '/Users/thlorenz/dev/js/projects/stack-mapper/test/twofiles/barbar.js',\n    line: 8,\n    column: 10\n}, {\n ...\n}]\n```\n\n## Obtaining the source map\n\nYou need to pass the source map as an object as shown in the example. If your source map happens to be in a different\nformat, please use the [convert-source-map](https://github.com/thlorenz/convert-source-map) module in order to convert it.\n\n[browserify](https://github.com/substack/node-browserify) attaches source maps to the bottom of the bundle if the `--debug` flag is set, here is an example how to\nobtain and convert it to use with `stack-mapper`.\n\n```js\nvar browserify =  require('browserify')\n  , convert    =  require('convert-source-map')\n\nbrowserify()\n  .require(entry)\n  .bundle({ debug: true }, function (err, src) {\n    if (err) return cb(err);\n\n    var map = convert.fromSource(src).toObject();\n  });\n```\n\n## Installation\n\n    npm install stack-mapper\n\n## API\n\n### stackMapper(sourcemap)\n\n```\n/**\n * Returns a Stackmapper that will use the given source map to map error trace locations.\n * \n * @name stackMapper\n * @function\n * @param {Object} sourcemap source map for the generated file\n * @return {StackMapper} stack mapper for the particular source map\n */\n```\n\n### stackMapper.map(frames, includeSource)\n\n```\n/**\n * Maps the trace statements of the given error stack and replaces locations\n * referencing code in the generated file with the locations inside the original files.\n * \n * @name map\n * @function\n * @param {Array} array of callsite objects (see readme for details about Callsite object)\n * @param {boolean} includeSource if set to true, the source code at the first traced location is included\n * @return {Array.<Object>} info about the error stack with adapted locations, each with the following properties\n *    - filename: original filename \n *    - line: origial line in that filename of the trace\n *    - column: origial column on that line of the trace\n */\n```\n\n## Stack Frames\n\nThe frames array passed to stackMapper.map should contain at least the following items\n\n* filename\n* line\n* column\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/thlorenz/stack-mapper","bugs":{"url":"https://github.com/thlorenz/stack-mapper/issues"},"license":{"type":"MIT","url":"https://github.com/thlorenz/stack-mapper/blob/master/LICENSE"}}