Skip to content

Instantly share code, notes, and snippets.

@drzhbe
Last active August 29, 2015 14:13
Show Gist options
  • Save drzhbe/d40b310fa8a1ed59bd3a to your computer and use it in GitHub Desktop.
Save drzhbe/d40b310fa8a1ed59bd3a to your computer and use it in GitHub Desktop.
После сохранения для pretty print можно в IDE сделать Code -> Reformat Code
var path = '';
function JSON2File(error, success, code) {
var writer = fs.createWriteStream(path + '.json');
var json = JSON.stringify(success.data);
writer.write(json);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment