Comparing version 0.3.1 to 0.3.2
@@ -39,9 +39,11 @@ 'use strict'; | ||
SQLParsingError.prototype.toString = function () { | ||
SQLParsingError.prototype.toString = function (level) { | ||
level = level > 0 ? parseInt(level) : 0; | ||
var gap = messageGap(level + 1); | ||
var lines = [ | ||
'SQLParsingError {', | ||
' code: parsingErrorCode.' + errorMessages[this.code].name, | ||
' error: "' + this.error + '"', | ||
' position: {line: ' + this.position.line + ", col: " + this.position.column + '}', | ||
'}' | ||
gap + 'code: parsingErrorCode.' + errorMessages[this.code].name, | ||
gap + 'error: "' + this.error + '"', | ||
gap + 'position: {line: ' + this.position.line + ", col: " + this.position.column + '}', | ||
messageGap(level) + '}' | ||
]; | ||
@@ -51,2 +53,6 @@ return lines.join(EOL); | ||
function messageGap(level) { | ||
return Array(level * 4).join(' '); | ||
} | ||
SQLParsingError.prototype.inspect = function () { | ||
@@ -53,0 +59,0 @@ return this.toString(); |
{ | ||
"name": "pg-minify", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Minifies PostgreSQL scripts.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
11442
255