On a similar basis, I once worked on a codebase where someone had implemented strftime, poorly, a few different ways, and also come up with several replacements for strptime, all of which had subtle bugs and none of which worked the same.
To add additional details, for those who might draw amusement and/or wisdom: In all cases the input/output date/time strings had the same format. Further, a number of the bugs were due to half-implemented reinventions of atoi being involved -- and atoi was definitely available, as one of the reinventions used it! Finally, in at least one case there was a Y2100 problem.
I'd tend to make this re-rolled atoi a wrapper around strtol/wcstol.
Ouch! TIL. You'd think by now I wouldn't be surprised by such things, and yet, somehow I was...
Given only the information you provided, I would hesitate to mock them, for fear they might make something really cool.
But 1000 lines?
var x = JSON.parse(fs.readFileSync('filename.json'));Did he try to write a complete JSON parser from scratch?