Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CLI script for node modules
#!/usr/bin/env node
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(data) {
var pd = require('pretty-data').pd;
var xml_min = pd.xmlmin(data,true);
process.stdout.write(xml_min);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment