Comparing version 0.1.0 to 0.2.0
@@ -38,10 +38,12 @@ #!/usr/bin/env node | ||
function printBlock(item) { | ||
var isMatch = orOptionsFilter(item) && andOptionsFilter(item) | ||
var print_color = isMatch ? 'prompt' : 'silly' | ||
var log = item.slice(0,item.indexOf('{') - 1) | ||
var item = item.slice(item.indexOf('{')) | ||
var toPrint =beautify(JSON.parse(item),null, 3, 100 ) | ||
console.log( toPrint[print_color] ) | ||
try{ | ||
var log = item.slice(0,item.indexOf('{') - 1) | ||
var item = item.slice(item.indexOf('{')) | ||
var toPrint =beautify(JSON.parse(item),null, 3, 100 ) | ||
console.log( toPrint[print_color] ) | ||
}catch(e){ | ||
console.log( item[print_color] ) | ||
} | ||
// if(body && body[0] === '{'){ | ||
@@ -48,0 +50,0 @@ // console.log(beautify(JSON.parse(body),null, 2, 100)[print_color]) |
{ | ||
"name": "j_utils", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "repository": { |
5347
176