stack-sites
Advanced tools
Comparing version 1.2.2 to 1.3.0
{ | ||
"name": "stack-sites", | ||
"description": "Returns current stack as call sites", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>", | ||
@@ -75,8 +75,9 @@ "bugs": "https://github.com/bahmutov/stack-sites/issues", | ||
"simple-commit-message": "3.0.2", | ||
"standard": "8.6.0" | ||
"standard": "9.0.1" | ||
}, | ||
"dependencies": { | ||
"check-more-types": "2.23.0", | ||
"debug": "2.6.3", | ||
"lazy-ass": "1.5.0" | ||
} | ||
} |
# stack-sites | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/bahmutov/stack-sites.svg)](https://greenkeeper.io/) | ||
> Returns current stack as call sites | ||
@@ -42,2 +44,6 @@ | ||
## Debug | ||
To see the original and parsed stack, run with `DEBUG=stack-sites` environment variable. | ||
### Small print | ||
@@ -44,0 +50,0 @@ |
'use strict' | ||
const debug = require('debug')('stack-sites') | ||
const parseStackLine = require('./parse-stack-line') | ||
@@ -20,3 +21,4 @@ | ||
stack = stack || ((new Error('stack-sites').stack)) | ||
return stack.split('\n') | ||
debug(stack) | ||
const parsed = stack.split('\n') | ||
.slice(1) // remove exception itself | ||
@@ -27,4 +29,7 @@ .filter(hasLineInfo) | ||
.map(parseStackLine) | ||
debug('parsed and cleaned up stack') | ||
debug(parsed) | ||
return parsed | ||
} | ||
module.exports = stackSites |
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
7657
81
94
3
+ Addeddebug@2.6.3
+ Addeddebug@2.6.3(transitive)
+ Addedms@0.7.2(transitive)