This is likely running JS in the same way that some embedded GSM modules "run Python". It uses the language syntax and semantics, but uses a different, small runtime with very limited features. Probably there are some host objects (like Window in the browser world — likely stuff like Camera) and JS is just used as a convenient language to write the logic in.
Which is all to say it's really far removed from left-pad and the rest of the npm cluster**.
https://xkcd.com/2347/