Ask HN: Can you protect your JavaScript code?
Seriously, if you are wanting to protect client side js, you are closing the barn after the horse has bolted.<p>Even with obfuscation, if the code is worth copying (for any reason, including money), it will be copied. It is irrelevant if it closed or open source.<p>Even with it server side, any mistakes on your part and the code is available to whoever really wants it.<p>Your friends would be better off finding out who was sold the code and letting those people know where the code actually came from. Do it pleasantly and your friends may find themselves some new customers.<p>The one thing they do need to be careful about is not coming across vindictively. The potential clients may find that attitude less than favourable. Your friends could even do reviews on the Fiverr site with humorous comments about how good the people were at copying other peoples code and selling it as their own. Be funny about it and let the culprits lose it. It will pay off in the end.<p>I have come across others who have had their work copied and then sold. The best way to handle this is NOT to get angry, but to use it as a means of advertising yourself. Your work is so good that people want copy it and pretend that it is their own work. How good a recommendation is that?<p>There are different ways to handle this, be inventive, be pleasant and be smart.