<p>I'm working on building a development tool that is written in JavaScript.</p>

<p>This will not be an open source project and will be sold (hopefully) as a commercial product.</p>

<p>I'm looking for the best way to protect my investment. Is using an obfuscator (code mangler) enough to reasonably secure the code?</p>

<p>Are there other alternatives that I am not aware of?</p>

<p>(I'm not sure if obfuscator is the right word, it's one of the apps that takes your code and makes it very unreadable.)</p>

That's probably about the best you can do.  Just be aware that anybody with enough dedication, can probably de-obfuscate your program.   Just make sure you're comfortable with that before embarking on your project.  I think the biggest problem with this would be to control who's using it on their site.    If somebody goes to a site with your code on it, and likes what it does, it doesn't matter that they don't understand what the code does, or can't read it, when they can just copy the code, and use it on their own site.