How can I obfuscate the codes written in function node?

Hi Forum,
Is there a way to obfuscate the codes written in function nodes suppose if I want to deploy my flows to the client side?

I don't think there is any really strong way of doing this in JavaScript. You could move the code to a module and run that through a good compressor which would certainly make it harder to easily read but there are plenty of tools that will make such code at least partially readable again.

The only strong way to hide your code is to put it on your own server and make it available via an API.

1 Like

There is a javascript-obfuscator npm package for making your code somewhat unreadable/confusing

here is an online version:

Just note that it most certainly does not "prevent". That is not possible for a scripting language (and almost certainly not for any other either). It just makes it harder. But it also makes the code less efficient.

1 Like