@@ -2,16 +2,44 @@ error-stack-parser.js - Extract meaning from JS Errors
22===============
33[ ![ Build Status] ( https://travis-ci.org/stacktracejs/error-stack-parser.svg?branch=master )] ( https://travis-ci.org/stacktracejs/error-stack-parser ) [ ![ Coverage Status] ( https://img.shields.io/coveralls/stacktracejs/error-stack-parser.svg )] ( https://coveralls.io/r/stacktracejs/error-stack-parser ) [ ![ Code Climate] ( https://codeclimate.com/github/stacktracejs/error-stack-parser/badges/gpa.svg )] ( https://codeclimate.com/github/stacktracejs/error-stack-parser )
44
5+ Simple, cross-browser [ Error] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error ) parser.
6+ This library parses and extracts function names, URLs, line numbers, and column numbers from the given Error's ` stack ` as
7+ an Array of [ StackFrame] ( http://git.io/stackframe ) s.
8+
9+ Once you have parsed out StackFrames, you can do much more interesting things. See [ stacktrace-gps] ( http://git.io/stacktrace-gps ) .
10+
11+ Note that in IE9 and earlier, ` Error ` objects don't have enough information to extract much of anything. In IE 10, ` Error ` s
12+ are given a ` stack ` once they're ` throw ` n.
13+
514## Usage
6- ```
7- ErrorStackParser.parse(new Error("sample" ));
15+ ``` js
16+ ErrorStackParser .parse (new Error (' boom ' ));
817
9- => [StackFrame('funName1', [], 'path/to/file.js', 35, 79), StackFrame(..)]
18+ => [
19+ StackFrame (' funky1' , [], ' path/to/file.js' , 35 , 79 ),
20+ StackFrame (' filter' , undefined , ' https://cdn.somewherefast.com/utils.min.js' , 1 , 832 ),
21+ StackFrame (... and so on ... )
22+ ]
1023```
1124
1225## Installation
13- ```
26+ ``` bash
1427npm install error-stack-parser
1528bower install error-stack-parser
1629https://raw.githubusercontent.com/stacktracejs/error-stack-parser/master/dist/error-stack-parser.min.js
1730```
31+
32+ ## Browser Support
33+ * Chrome 1+
34+ * Firefox 3.6+
35+ * Safari 7+
36+ * Opera 9+
37+ * IE 10+
38+ * iOS 7+
39+ * Android 4.2+
40+
41+ ## Contributing
42+ Want to be listed as a * Contributor* ? Start with the [ Contributing Guide] ( CONTRIBUTING.md ) !
43+
44+ ## License
45+ This project is licensed to the [ Public Domain] ( http://unlicense.org )
0 commit comments