To install node-obf, use npm:
$ npm install node-obf
require('node-obf').obfuscate(global variable, code);
Example:
var obf = require('node-obf');
obf.obfuscate('$$', 'alert("hello world!")');
This will return
$$=~[];$$={___:++$$,$$$$:(![]+"")[$$],__$:++$$,$_$_:(![]+"")[$$],_$_:++$$,$_$$:({}+"")[$$],$$_$:($$[$$]+"")[$$],_$$:++$$,$$$_:(!""+"")[$$],$__:++$$,$_$:++$$,$$__:({}+"")[$$],$$_:++$$,$$$:++$$,$___:++$$,$__$:++$$};$$.$_=($$.$_=$$+"")[$$.$_$]+($$._$=$$.$_[$$.__$])+($$.$$=($$.$+"")[$$.__$])+((!$$)+"")[$$._$$]+($$.__=$$.$_[$$.$$_])+($$.$=(!""+"")[$$.__$])+($$._=(!""+"")[$$._$_])+$$.$_[$$.$_$]+$$.__+$$._$+$$.$;$$.$$=$$.$+(!""+"")[$$._$$]+$$.__+$$._+$$.$+$$.$$;$$.$=($$.___)[$$.$_][$$.$_];$$.$($$.$($$.$$+"\""+$$.$_$_+(![]+"")[$$._$_]+$$.$$$_+"\\"+$$.__$+$$.$$_+$$._$_+$$.__+"(\\\"\\"+$$.__$+$$.$_$+$$.___+$$.$$$_+(![]+"")[$$._$_]+(![]+"")[$$._$_]+$$._$+"\\"+$$.$__+$$.___+"\\"+$$.__$+$$.$$_+$$.$$$+$$._$+"\\"+$$.__$+$$.$$_+$$._$_+(![]+"")[$$._$_]+$$.$$_$+"!\\\")"+"\"")())();
All credit to Yosuke Hasegawa. All I did was find this on SO, clean up the source, and turn it into a node module. You can view the original authors site at http://utf-8.jp/