Skip to content

Commit 797cc04

Browse files
committed
Remove unused
1 parent b4c4602 commit 797cc04

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

lib/backend.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function Backend({
7979

8080
for (let i = x.length - 1; i > 0; i--) {
8181
if (x[i] === 32 && x[i + 1] < 58 && backend.query.result.count === null)
82-
backend.query.result.count = +x.utf8Slice(i + 1, x.length - 1) // eslint-disable-line
82+
backend.query.result.count = +x.utf8Slice(i + 1, x.length - 1)
8383
if (x[i - 1] >= 65) {
8484
backend.query.result.command = x.utf8Slice(5, i)
8585
break
@@ -143,7 +143,7 @@ function Backend({
143143
function NoticeResponse(x) {
144144
onnotice
145145
? onnotice(error(x))
146-
: console.log(error(x))
146+
: console.log(error(x)) // eslint-disable-line
147147
}
148148

149149
function NoData() { /* No handling needed */ }

lib/connection.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ export default function Connection(options = {}) {
166166
connection.ready = connection.active = false
167167
}
168168

169-
function unknown(buffer) {
170-
// console.log('Unknown Message', buffer[0])
169+
function unknown() {
170+
// console.log('Unknown Message', x[0])
171171
}
172172
}
173173

lib/types.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ export const types = {
55
string: {
66
to: 25,
77
from: null, // defaults to string
8-
serialize: x => '' + x // eslint-disable-line
8+
serialize: x => '' + x
99
},
1010
number: {
1111
to: 1700,
1212
from: [20, 21, 23, 26, 700, 701, 790, 1700],
13-
serialize: x => '' + x, // eslint-disable-line
14-
parse: x => +x // eslint-disable-line
13+
serialize: x => '' + x,
14+
parse: x => +x
1515
},
1616
json: {
1717
to: 3802,
@@ -53,7 +53,7 @@ export function mergeUserTypes(types) {
5353
}
5454

5555
function typeHandlers(types) {
56-
return Object.entries(types).reduce((acc, [name, type]) => {
56+
return Object.entries(types).reduce((acc, [, type]) => {
5757
type.from && type.from.forEach(x => acc.parsers[x] = type.parse)
5858
acc.serializers[type.to] = type.serialize
5959
return acc
@@ -94,7 +94,9 @@ export function arraySerializer(xs, serializer) {
9494
if (Array.isArray(first) && !first.type)
9595
return '{' + xs.map(x => arraySerializer(x, serializer)).join(',') + '}'
9696

97-
return '{' + xs.map(x => '"' + arrayEscape(serializer ? serializer(x.type ? x.value : x) : '' + x) + '"').join(',') + '}'
97+
return '{' + xs.map(x =>
98+
'"' + arrayEscape(serializer ? serializer(x.type ? x.value : x) : '' + x) + '"'
99+
).join(',') + '}'
98100
}
99101

100102
const arrayParserState = {

0 commit comments

Comments
 (0)