Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
constantology committed Feb 29, 2012
1 parent 296e23d commit 8a96aed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ansi-pansi.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var code = {
bg_black : 40, bg_red : 41, bg_green : 42, bg_yellow : 43, bg_blue : 44, bg_magenta : 45, bg_cyan : 46, bg_white : 47
};

exports = function ansi_pansi( str, colour ) {
module.exports = function ansi_pansi( str, colour ) {
var f = colour.split( /[\s\+]/ ).reduce( function( s, a ) { return ( a in code ) ? s += code[a] + ';' : s; }, '' );
return ( f.length ? '\033[' + f + 'm' : f ) + str + '\033[0m';
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"type" : "git",
"url" : "git@github.com:constantology/ansi-pansi.git"
},
"version" : "0.0.1"
"version" : "0.0.2"
}

0 comments on commit 8a96aed

Please sign in to comment.