Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

error-stack-parser

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error-stack-parser - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

60

error-stack-parser.js

@@ -1,2 +0,2 @@

(function (root, factory) {
(function(root, factory) {
'use strict';

@@ -49,4 +49,5 @@ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.

* Given an Error object, extract the most information from it.
* @param error {Error}
* @return Array[StackFrame]
*
* @param {Error} error object
* @return {Array} of StackFrames
*/

@@ -67,4 +68,5 @@ parse: function ErrorStackParser$$parse(error) {

* Separate line and column numbers from a URL-like string.
* @param urlLike String
* @return Array[String]
*
* @param {String} urlLike
* @return {Array} 3-tuple of URL, Line Number, and Column Number
*/

@@ -89,7 +91,7 @@ extractLocation: function ErrorStackParser$$extractLocation(urlLike) {

parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
var filtered = _filter(error.stack.split('\n'), function (line) {
var filtered = _filter(error.stack.split('\n'), function(line) {
return !!line.match(CHROME_IE_STACK_REGEXP);
}, this);
return _map(filtered, function (line) {
return _map(filtered, function(line) {
if (line.indexOf('(eval ') > -1) {

@@ -102,3 +104,3 @@ // Throw away eval information until we implement stacktrace.js/stackframe#8

var functionName = tokens.join(' ') || undefined;
var fileName = locationParts[0] === 'eval' ? undefined : locationParts[0];
var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];

@@ -110,7 +112,7 @@ return new StackFrame(functionName, undefined, fileName, locationParts[1], locationParts[2], line);

parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {
var filtered = _filter(error.stack.split('\n'), function (line) {
var filtered = _filter(error.stack.split('\n'), function(line) {
return !line.match(SAFARI_NATIVE_CODE_REGEXP);
}, this);
return _map(filtered, function (line) {
return _map(filtered, function(line) {
// Throw away eval information until we implement stacktrace.js/stackframe#8

@@ -127,4 +129,9 @@ if (line.indexOf(' > eval') > -1) {

var locationParts = this.extractLocation(tokens.pop());
var functionName = tokens.shift() || undefined;
return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2], line);
var functionName = tokens.join('@') || undefined;
return new StackFrame(functionName,
undefined,
locationParts[0],
locationParts[1],
locationParts[2],
line);
}

@@ -168,3 +175,12 @@ }, this);

if (match) {
result.push(new StackFrame(match[3] || undefined, undefined, match[2], match[1], undefined, lines[i]));
result.push(
new StackFrame(
match[3] || undefined,
undefined,
match[2],
match[1],
undefined,
lines[i]
)
);
}

@@ -178,8 +194,7 @@ }

parseOpera11: function ErrorStackParser$$parseOpera11(error) {
var filtered = _filter(error.stack.split('\n'), function (line) {
return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&
!line.match(/^Error created at/);
var filtered = _filter(error.stack.split('\n'), function(line) {
return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);
}, this);
return _map(filtered, function (line) {
return _map(filtered, function(line) {
var tokens = line.split('@');

@@ -195,4 +210,11 @@ var locationParts = this.extractLocation(tokens.pop());

}
var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ? undefined : argsRaw.split(',');
return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2], line);
var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?
undefined : argsRaw.split(',');
return new StackFrame(
functionName,
args,
locationParts[0],
locationParts[1],
locationParts[2],
line);
}, this);

@@ -199,0 +221,0 @@ }

{
"name": "error-stack-parser",
"description": "Extract meaning from JS Errors",
"maintainers": [
"Eric Wendelin <me@eriwen.com> (http://www.eriwen.com)",
"Victor Homyakov <vkhomyackov@gmail.com> (https://github.com/victor-homyakov)",
"Oliver Salzburg (https://github.com/oliversalzburg)"
],
"version": "1.3.3",
"license": "Unlicense",
"keywords": [
"stacktrace",
"error",
"stack",
"parser"
],
"homepage": "https://www.stacktracejs.com",
"dependencies": {
"stackframe": "^0.3.1"
},
"repository": {
"type": "git",
"url": "git://github.com/stacktracejs/error-stack-parser.git"
},
"devDependencies": {
"colors": "^1.1.2",
"del": "^1.2.1",
"gulp": "^3.9.0",
"gulp-concat": "^2.6.0",
"gulp-coveralls": "^0.1.4",
"gulp-jshint": "^2.0.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.5.1",
"jasmine": "^2.3.2",
"jasmine-core": "^2.3.4",
"jshint": "^2.8.0",
"karma": "~0.13",
"karma-chrome-launcher": "^0.1.12",
"karma-coverage": "^0.5.3",
"karma-firefox-launcher": "^0.1.7",
"karma-ie-launcher": "^0.2.0",
"karma-jasmine": "^0.3.6",
"karma-opera-launcher": "^0.1.0",
"karma-phantomjs2-launcher": "^0.3.2",
"karma-safari-launcher": "^0.1.1",
"karma-sauce-launcher": "^0.3.0",
"karma-spec-reporter": "0.0.23",
"run-sequence": "^1.1.5"
},
"bugs": {
"url": "https://github.com/stacktracejs/error-stack-parser/issues"
},
"main": "./error-stack-parser.js",
"files": [
"LICENSE",
"README.md",
"error-stack-parser.js",
"dist/"
],
"scripts": {
"test": "gulp test"
}
"name": "error-stack-parser",
"description": "Extract meaning from JS Errors",
"maintainers": [
"Eric Wendelin <me@eriwen.com> (http://www.eriwen.com)",
"Victor Homyakov <vkhomyackov@gmail.com> (https://github.com/victor-homyakov)",
"Oliver Salzburg (https://github.com/oliversalzburg)"
],
"version": "1.3.4",
"license": "Unlicense",
"keywords": [
"stacktrace",
"error",
"stack",
"parser"
],
"homepage": "https://www.stacktracejs.com",
"dependencies": {
"stackframe": "^0.3.1"
},
"repository": {
"type": "git",
"url": "git://github.com/stacktracejs/error-stack-parser.git"
},
"devDependencies": {
"colors": "^1.1.2",
"del": "^1.2.1",
"gulp": "^3.9.0",
"gulp-concat": "^2.6.0",
"gulp-coveralls": "^0.1.4",
"gulp-jshint": "^2.0.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.5.1",
"jasmine": "^2.3.2",
"jasmine-core": "^2.3.4",
"jscs": "^2.9.0",
"jshint": "^2.8.0",
"karma": "~0.13",
"karma-chrome-launcher": "^0.1.12",
"karma-coverage": "^0.5.3",
"karma-firefox-launcher": "^0.1.7",
"karma-ie-launcher": "^0.2.0",
"karma-jasmine": "^0.3.6",
"karma-opera-launcher": "^0.1.0",
"karma-phantomjs2-launcher": "^0.3.2",
"karma-safari-launcher": "^0.1.1",
"karma-sauce-launcher": "^0.3.0",
"karma-spec-reporter": "0.0.23",
"run-sequence": "^1.1.5"
},
"bugs": {
"url": "https://github.com/stacktracejs/error-stack-parser/issues"
},
"main": "./error-stack-parser.js",
"files": [
"LICENSE",
"README.md",
"error-stack-parser.js",
"dist/"
],
"scripts": {
"test": "gulp test"
}
}
error-stack-parser.js - Extract meaning from JS Errors
===============
[![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)
[![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) [![GitHub license](https://img.shields.io/github/license/stacktracejs/error-stack-parser.svg)](http://unlicense.org)

@@ -38,3 +38,1 @@ Simple, cross-browser [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) parser.

## License
This project is licensed to the [Public Domain](http://unlicense.org)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc