NodeJs version of monsterId library by Andreas Gohr

NodeJs implementation of monsterId PHP library. It depends by node-gd, crypto and srand npm packages.

$ npm install monsterid

//Include monsterId and create an http Server. var monsterId = require('monsterid'); var http = require('http');

http.createServer(function(req, res) { // Create your seed. var seed = 'abcdefg';

var avatar = new monsterId(seed);

// use public method getAvatar to retrieve an image in binary format.
res.writeHead(200, {'Content-type':'image/png'});
res.end(avatar.getAvatar(), 'binary');


Thanks to Andreas Gohr for his job on the original library.