derhuerst / db-stations

A list of Deutsche Bahn stations.
ISC License
25 stars 4 forks source link

malformed postal codes #2

Closed juliuste closed 7 years ago

juliuste commented 7 years ago

In build/details.js, the postal codes from the database(s) are converted to Number. As far as I know, it is usual to store them as String, since some postal codes begin with 0 (which is lost in conversion to Number). Also, while converting the String to Number yourself is pretty easy, the re-adding of the missing digit is comparatively hard. Therefore, I propose to change/normalize(?) this behaviour and to remove the conversion by default.

juliuste commented 7 years ago

Also, couldn't postal codes theoretically contain letters?