Comparing version 0.0.3 to 0.0.4
@@ -78,3 +78,3 @@ | ||
args = require('karg')("\ncolorcat\n\n file . ? the file to display or stdin . *\n" + textColors + "\n fat . ? " + '▲▲ fat'.bold.white + " . = false\n dim . = false\n ? |" + ' ▲▲ dim'.dim.white + " \n" + bgrdColors + "\n pattern . ? colorize with patterns in file\n \nversion " + (require(__dirname + "/../package.json").version)); | ||
args = require('karg')("\ncolorcat\n\n file . ? the file to display or stdin . *\n" + textColors + "\n fat . ? " + '▲▲ fat'.bold.white + " . = false\n dim . = false\n ? |" + ' ▲▲ dim'.dim.white + " \n" + bgrdColors + "\n pattern . ? colorize with pattern\n patternFile . ? colorize with patterns in file . - P\n \nversion " + (require(__dirname + "/../package.json").version)); | ||
@@ -103,18 +103,24 @@ | ||
if (args.pattern != null) { | ||
patterns = sds.load(args.pattern); | ||
if (_.isObject(patterns)) { | ||
for (r in patterns) { | ||
c = patterns[r]; | ||
regexes.push({ | ||
reg: new RegExp(r), | ||
fun: c.map(function(i) { | ||
return function(s) { | ||
return colorize(i, s); | ||
}; | ||
}) | ||
}); | ||
} | ||
} else { | ||
args.pattern = null; | ||
patterns = noon.parse(args.pattern); | ||
} | ||
if (args.patternFile != null) { | ||
patterns = sds.load(args.patternFile); | ||
} | ||
if (patterns != null) { | ||
if (!args.pattern) { | ||
args.pattern = true; | ||
} | ||
for (r in patterns) { | ||
c = patterns[r]; | ||
regexes.push({ | ||
reg: new RegExp(r), | ||
fun: c.map(function(i) { | ||
return function(s) { | ||
return colorize(i, s); | ||
}; | ||
}) | ||
}); | ||
} | ||
} | ||
@@ -121,0 +127,0 @@ |
{ | ||
"name": "colorcat", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "color's cat", | ||
@@ -5,0 +5,0 @@ "main": "js/colorcat.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6965
192