Skip to content

Commit e83cd07

Browse files
author
Eric Wendelin
committed
Add browser support, contributions and license sections.
1 parent b349c24 commit e83cd07

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

README.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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
1427
npm install error-stack-parser
1528
bower install error-stack-parser
1629
https://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

Comments
 (0)