No description or website provided.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
img
lib
test
README.md
package.json
sample.js

README.md

README

  • Twitter の CLI Client 向けに書いた(colors だとやりたい事出来なかったので)。
  • String.prototype は弄ってない。

使用例

var colorize = require('ANSIColor').colorize;

String.prototype.colorize = function() {
  return colorize.bind(this)(this);
};

console.log('%s',
  "@hnagato https://github.com/hnagato a sample tweet. #test"
    .colorize()
    .apply(/@[a-zA-Z0-9_]+/)
    .apply(/#\S+/)
    .blue().underline().apply(/https:\/\/\S+/));

result