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

pg-promise

Package Overview
Dependencies
Maintainers
1
Versions
629
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-promise - npm Package Compare versions

Comparing version 0.4.4 to 0.4.5

16

index.js

@@ -186,12 +186,2 @@ // Cannot declare 'use strict' here, because queryResult

// Checks if the object is empty (has no properties);
function $isEmptyObject(obj) {
return Object.keys(obj).length === 0;
}
// Fixes single-quote symbols in text fields;
function $fixQuotes(val) {
return val.replace("'", "''");
}
// Wraps up text in single quotes;

@@ -249,3 +239,3 @@ function $wrapText(text) {

if (s === null) {
throw new Error("Cannot convert the value of type '" + typeof(values) + "'");
throw new Error("Cannot convert a value of type '" + typeof(values) + "'");
}

@@ -263,3 +253,5 @@ }

}
return $wrapText($fixQuotes(txt));
// replacing single-quote symbols with two of them, and then
// wrapping in quotes, for compatibility with PostgreSQL.
return $wrapText(txt.replace("'", "''"));
},

@@ -266,0 +258,0 @@ bool: function (val) {

{
"name": "pg-promise",
"version": "0.4.4",
"version": "0.4.5",
"description": "PG + Promise made easy, with transactions support.",

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

# Introduction
<img align="right" width="190" height="190" src="https://lh6.googleusercontent.com/UggPXQ3ArL4rXdSFG6xVbUY8QLNnBPBr8C2r0ITTBM_KHu1G0JXfNmvX_q_98QRYsF6smpWZc2w=w1896-h912">
<img align="right" width="190" height="190" src="https://upload.wikimedia.org/wikipedia/commons/a/a8/Pg-promise.jpg">

@@ -118,2 +118,3 @@ This library joins [Promise] and [PG] to help writing easy-to-read database code that relies on promises:

Example of a detached transaction:

@@ -120,0 +121,0 @@ ```javascript

Sorry, the diff of this file is not supported yet

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