To use js-beautify as a node library (after install locally), import and call the appropriate beautifier method for javascript (js), css, or html. All three method signatures are beautify (code, ...
面白法人カヤック技術部ブログ「JS体操」のすゝめ 〜その①〜用のサンプルコードです。 001/ugly.json を JSON.parse() や JSON.stringify() を使わずに綺麗に整形してみましょう。 汎用的なコードにする必要はありません。001/ugly.json のみを綺麗に整形できれば OK です。