abstractvector / node-dbf

An efficient dBase DBF file parser written in pure JavaScript
MIT License
54 stars 67 forks source link

Parser handles Logical fields incorrectly #37

Open grim-i-am opened 5 years ago

grim-i-am commented 5 years ago

Logical fields are parsed to null because there is an error in parser.js on line 166:

switch (value) {
case ['Y', 'y', 'T', 't'].includes(value):
   value = true;
   break;
case ['N', 'n', 'F', 'f'].includes(value):
   value = false;
   break`
default:
   value = null;
}

It should be:

switch(true){