https://github.com/pgriess/node-jspack appears to be a straight-up port of Python's struct
API for packing binary data, but it's implemented in JS. It doesn't appear to be packaged for npm yet.
https://github.com/substack/node-binary provides unpacking, also implemented in JS, and you can install it with npm install binary
if you have npm installed.