fix jshint errors for lib/types.js

This commit is contained in:
Philipp Borgers 2013-01-21 14:53:46 +01:00
parent ffe2c15a65
commit fe09e96ae9

View File

@ -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
}
};