I recommend NOT implementing plugins in JavaScript with the Ducktape JS layer. I strongly recommend writing plugins in Lua for maximal compatibility and performance.
Why's that? We wrote it to be functionally identical to the Lua plugin (the code base is the same), so engine and language apart they should behave pretty much the same way. Is there any known issue or limitation you're aware of?