mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
fix jshint errors for lib/types.js
This commit is contained in:
parent
ffe2c15a65
commit
fe09e96ae9
@ -9,13 +9,14 @@ var typeParsers = {
|
||||
//the empty parse function
|
||||
var noParse = function(val) {
|
||||
return String(val);
|
||||
}
|
||||
};
|
||||
|
||||
//returns a function used to convert a specific type (specified by
|
||||
//oid) into a result javascript type
|
||||
var getTypeParser = function(oid, format) {
|
||||
if (!typeParsers[format])
|
||||
if (!typeParsers[format]) {
|
||||
return noParse;
|
||||
}
|
||||
|
||||
return typeParsers[format][oid] || noParse;
|
||||
};
|
||||
@ -26,7 +27,7 @@ var setTypeParser = function(oid, format, parseFn) {
|
||||
format = 'text';
|
||||
}
|
||||
typeParsers[format][oid] = parseFn;
|
||||
}
|
||||
};
|
||||
|
||||
textParsers.init(function(oid, converter) {
|
||||
typeParsers.text[oid] = function(value) {
|
||||
@ -41,4 +42,4 @@ binaryParsers.init(function(oid, converter) {
|
||||
module.exports = {
|
||||
getTypeParser: getTypeParser,
|
||||
setTypeParser: setTypeParser
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user