Comparing version 0.1.9 to 0.1.10
@@ -43,3 +43,5 @@ // Generated by CoffeeScript 1.9.3 | ||
Logger.prototype.stringify = function(text) { | ||
if (text instanceof Object) { | ||
if (text instanceof Error) { | ||
text = text.stack; | ||
} else if (text instanceof Object) { | ||
text = JSON.stringify(text); | ||
@@ -52,7 +54,7 @@ } | ||
var browserReg, fileAndLineInfos, filePath, firstLineStack, line, nodeReg, stacklist; | ||
stacklist = (new Error()).stack.split('\n').slice(3); | ||
stacklist = (new Error()).stack.split('\n').slice(4); | ||
nodeReg = /at\s+(.*)\s+\((.*):(\d*):(\d*)\)/gi; | ||
browserReg = /at\s+()(.*):(\d*):(\d*)/gi; | ||
firstLineStack = stacklist[0]; | ||
fileAndLineInfos = nodeReg.exec(firstLineStack) || browserReg2.exec(firstLineStack); | ||
fileAndLineInfos = nodeReg.exec(firstLineStack) || browserReg.exec(firstLineStack); | ||
filePath = fileAndLineInfos[2].substr(process.cwd().length); | ||
@@ -59,0 +61,0 @@ line = fileAndLineInfos[3]; |
@@ -16,3 +16,3 @@ { | ||
], | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"homepage": "https://github.com/frankrousseau/printit/", | ||
@@ -19,0 +19,0 @@ "bugs": { |
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
20634
467