Permalink
Browse files

Lint color module.

  • Loading branch information...
1 parent 94536ec commit 60d8eedd66b08d3064f2f0c89e133970727cad78 @reid reid committed Mar 9, 2012
Showing with 10 additions and 8 deletions.
  1. +10 −8 lib/color.js
View
@@ -1,16 +1,18 @@
-function color (code, string) {
- return "\033[" + code + "m" + string + "\033[0m";
+"use strict";
+
+function color(code, string) {
+ return "\u001b[" + code + "m" + string + "\u001b[0m";
}
-function factory (code) {
+function factory(code) {
return function (string) {
return color(code, string);
- }
+ };
}
exports.codes = {
- bold : factory(1),
- red : factory(31),
- green : factory(32),
- blue : factory(34)
+ bold: factory(1),
+ red: factory(31),
+ green: factory(32),
+ blue: factory(34)
};

0 comments on commit 60d8eed

Please sign in to comment.