Comparing version 0.1.7 to 0.1.8
11
main.js
@@ -93,4 +93,13 @@ // Generated by CoffeeScript 1.9.0 | ||
Logger.prototype.error = function() { | ||
var texts; | ||
var errDetails, filePath, line, s, sp, stackReg, stackReg2, stacklist, texts; | ||
texts = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
stacklist = (new Error()).stack.split('\n').slice(2); | ||
stackReg = /at\s+(.*)\s+\((.*):(\d*):(\d*)\)/gi; | ||
stackReg2 = /at\s+()(.*):(\d*):(\d*)/gi; | ||
s = stacklist[0]; | ||
sp = stackReg.exec(s) || stackReg2.exec(s); | ||
filePath = sp[2].substr(process.cwd().length); | ||
line = sp[3]; | ||
errDetails = "." + filePath + ":" + line + " |"; | ||
texts.unshift(errDetails); | ||
if (process.env.NODE_ENV !== 'test') { | ||
@@ -97,0 +106,0 @@ return console.error(this.format('error', texts)); |
@@ -16,3 +16,3 @@ { | ||
], | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"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
20334
460