JS module code formatter per @HenrikJoreteg's preferences.
Mainly for personal use, but sharing if someone wants to use it.
$ npm install code-scrub -g$ cat some.js | code-scrub# can also pass options$ cat some.js | code-scrub --indent=4# or set options by creating `$HOME/.code-scrubrc` as a JSON (or INI) file with config options# or if you're brave$ code-scrub myfile.jsThis will re-write the file in place with new style applied
var fs = ;var scrub = ;// read in some codevar code = fs;// available options and their defaultsvar scrubbed =;console;
If you like this follow @HenrikJoreteg on twitter.