varinspect=require('util').inspectif(!module.parent){vares=require('..')//load event-streames.pipe(//pipe joins streams togetherprocess.openStdin(),//open stdines.split(),//split stream to break on newlineses.map(function(data,callback){//turn this async function into a streamvarjtry{j=JSON.parse(data)//try to parse input into json}catch(err){returncallback(null,data)//if it fails just pass it anyway}callback(null,inspect(j))//render it nicely}),process.stdout// pipe it to stdout !)}// run this// // curl -sS registry.npmjs.org/event-stream | node pretty.js //