Binaries are easily pirated, and can be de-compiled. Obfuscating a Javascript file is almost as effective for protecting your code.
Either way, the only way to protect your code 100% is to run it on your own machine, and not on the user's.
Because decompiling isn't a thing?
Re:Protecting your Firefox OS App code
by AsymetricCom on Friday December 06, 2013 @01:18PM
(#6862574)
Because decompiling is a lot easier when your "executable" is a high level language built on top of a well known and heavily targeted VM.
There is no step 2