stacktracey
Advanced tools
Comparing version 2.0.10 to 2.0.11
@@ -9,2 +9,4 @@ # Version 2.0 (with breaking changes) | ||
- Also, it does not call `withSources` automatically — you need to call it explicitly. | ||
- It is no longer `extends Array` due to non-working user subclassing with Babel ES5 | ||
@@ -11,0 +13,0 @@ - Use `.items` to access original array |
{ | ||
"name": "stacktracey", | ||
"version": "2.0.10", | ||
"version": "2.0.11", | ||
"description": "Parses call stacks. Reads sources. Clean & filtered output. Sourcemaps. Node & browsers.", | ||
@@ -5,0 +5,0 @@ "main": "stacktracey", |
@@ -171,4 +171,7 @@ # StackTracey | ||
```javascript | ||
const prettyPrintedString = new StackTracey (error).asTable () | ||
const prettyPrintedString = new StackTracey (error).withSources ().asTable () | ||
``` | ||
```javascript | ||
const prettyPrintedString = (await new StackTracey (error).withSourcesAsync ()).asTable () // asynchronous version | ||
``` | ||
@@ -178,3 +181,3 @@ ...or (for pretty printing cleaned output): | ||
```javascript | ||
const prettyPrintedString = new StackTracey (error).clean ().asTable () // NB: synchronously reads sources, use .cleanAsync for doing it async | ||
const prettyPrintedString = new StackTracey (error).clean ().asTable () | ||
``` | ||
@@ -181,0 +184,0 @@ ```javascript |
@@ -273,3 +273,3 @@ "use strict"; | ||
const trimmed = this.withSources ().map ( | ||
const trimmed = this.map ( | ||
e => [ | ||
@@ -276,0 +276,0 @@ ('at ' + trimEnd (e.calleeShort, maxColumnWidths.callee)), |
@@ -180,3 +180,3 @@ "use strict"; | ||
stack.asTable ().split ('\n')[0].should.equal ('at dadasdasdasdasdasdasdasdasdas… …asdadadadasdasdasdasdasddasdsadadasdassdasdaddadasdas.js:11 ') | ||
stack.withSources ().asTable ().split ('\n')[0].should.equal ('at dadasdasdasdasdasdasdasdasdas… …asdadadadasdasdasdasdasddasdsadadasdassdasdaddadasdas.js:11 ') | ||
}) | ||
@@ -294,3 +294,3 @@ | ||
const stack = new StackTracey (windowsStack) | ||
const pretty = stack.asTable () | ||
const pretty = stack.withSources ().asTable () | ||
const lines = pretty.split ('\n') | ||
@@ -297,0 +297,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42203
282