If you can live with compiling a declarative yaml description and only need to read the data then there is also kaitai-struct. [0] One of the compilation targets is javascript. Their web ide (feels kind of like a simple sweetscapes 010 editor) which is quite nice uses the js target. [1] Other targets are c++, java, php, python, ruby and more.
I used it in the past to read a proprietary file format and it worked well, but they also have quite a few predefined formats in their gallery. [2]
I used it in the past to read a proprietary file format and it worked well, but they also have quite a few predefined formats in their gallery. [2]
[0] http://kaitai.io/
[1] https://ide.kaitai.io/
[2] http://formats.kaitai.io/