Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/pg-cursor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ class Cursor extends EventEmitter {
this._cb(msg)
}
// dispatch error to all waiting callbacks
for (let i = 0; i < this._queue.length; i++) {
const queuedCallback = this._queue[i][1]
for (const [_, queuedCallback] of this._queue) {
queuedCallback.call(this, msg)
}
this._queue.length = 0
Expand Down
3 changes: 1 addition & 2 deletions packages/pg/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ const escapeLiteral = function (str) {
let hasBackslash = false
let escaped = "'"

for (let i = 0; i < str.length; i++) {
const c = str[i]
for (const c of str) {
if (c === "'") {
escaped += c + c
} else if (c === '\\') {
Expand Down
4 changes: 2 additions & 2 deletions packages/pg/test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
const ConnectionParameters = require('../lib/connection-parameters')
const config = new ConnectionParameters(process.argv[2])

for (let i = 0; i < process.argv.length; i++) {
switch (process.argv[i].toLowerCase()) {
for (const arg of process.argv) {
switch (arg.toLowerCase()) {
case 'native':
config.native = true
break
Expand Down