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

pg-minify

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-minify - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

2

lib/error.js

@@ -7,3 +7,3 @@ 'use strict';

unclosedQI: 3, // Unclosed quoted identifier.
multiLineQI: 4 // Multi-line quoted identifier not supported.
multiLineQI: 4 // Multi-line quoted identifiers are not supported.
};

@@ -10,0 +10,0 @@

@@ -63,3 +63,3 @@ 'use strict';

if (text.indexOf(EOL) > 0) {
throwError(PEC.multiLineQI, "Multi-line quoted identifier not supported.");
throwError(PEC.multiLineQI, "Multi-line quoted identifiers are not supported.");
}

@@ -91,3 +91,10 @@ addSpace();

var text = sql.substr(idx, closeIdx - idx + 1);
if (text.indexOf(EOL) > 0) {
var hasLB = text.indexOf(EOL) > 0;
if (hasLB) {
text = text.split(EOL).map(function (m) {
return m.replace(/^\s+|\s+$/g, '');
}).join('\\n');
}
var hasTabs = text.indexOf('\t') > 0;
if (hasLB || hasTabs) {
var prev = idx ? sql[idx - 1] : '';

@@ -97,6 +104,7 @@ if (prev !== 'E' && prev !== 'e') {

}
text = text.split(EOL).map(function (m) {
return m.replace(/^\s+|\s+$/g, '');
}).join('\\n');
if (hasTabs) {
text = text.replace(/\t/g, '\\t');
}
}
result += text;

@@ -103,0 +111,0 @@ idx = closeIdx;

{
"name": "pg-minify",
"version": "0.1.3",
"version": "0.1.4",
"description": "Minifies PostgreSQL scripts.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -64,2 +64,2 @@ pg-minify

[SQLParsingError]:https://github.com/vitaly-t/pg-minify/blob/master/lib/error.js#L10
[SQLParsingError]:https://github.com/vitaly-t/pg-minify/blob/master/lib/error.js
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