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 1.2.5 to 1.2.6

4

lib/parser.js

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

}
text = sql.substr(idx, closeIdx - idx + 1);
text = sql.substring(idx, closeIdx + 1);
if (text.indexOf(EOL) > 0) {

@@ -133,3 +133,3 @@ throwError(PEC.multiLineQI);

addSpace();
text = sql.substr(idx, closeIdx - idx + 1);
text = sql.substring(idx, closeIdx + 1);
const hasLB = text.indexOf(EOL) > 0;

@@ -136,0 +136,0 @@ if (hasLB) {

@@ -9,19 +9,10 @@ 'use strict';

function getEOL(text) {
let idx = 0, unix = 0, windows = 0;
while (idx < text.length) {
idx = text.indexOf('\n', idx);
if (idx === -1) {
break;
}
if (idx > 0 && text[idx - 1] === '\r') {
windows++;
} else {
unix++;
}
idx++;
}
if (unix === windows) {
const m1 = text.match(/\r\n/g);
const m2 = text.match(/\n/g);
const w = m1 ? m1.length : 0;
const u = m2 ? m2.length - w : 0;
if (u === w) {
return os.EOL;
}
return unix > windows ? '\n' : '\r\n';
return u > w ? '\n' : '\r\n';
}

@@ -28,0 +19,0 @@

{
"name": "pg-minify",
"version": "1.2.5",
"version": "1.2.6",
"description": "Minifies PostgreSQL scripts.",

@@ -5,0 +5,0 @@ "main": "lib/index.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