char-to-avatar
Convert a character to avatar image in NodeJS.

Dependencies
Demo
Installation
npm install char-to-avatar
API
var CharToAvatar = require('char-to-avatar')
new CharToAvatar(character[, options])
character
: {String}, a character to render.options.color
: {String}, character color, default to '#ffffff'
.options.backgroundColor
: {String}, background color, default to '#383838'
.options.shape
: {String}, 'square'
or 'circle'
,avatar shape, default to 'square'
.options.size
: {Number}, avatar size, default to 100
.
CharToAvatar.prototype.pngStream()
Return a png image stream.
CharToAvatar.prototype.jpegStream([quality])
Return a jpeg stream.
quality
: {Number}, 0 - 100
, jpeg quality, default is 85
.
CharToAvatar.prototype.toBuffer()
Return a thunk function that guarantee a png image buffer.
CharToAvatar.prototype.toDataURL([mime])
Return a thunk function that guarantee a image data string.
mime
: {String}, mime type, default is 'image/png'
.