PDFjs was written in JS from day one, and (as far as I know) was not based on any previous PDF reader.