How to store UUID as an alphanumeric in nodejs

Node-uuid provides an excellent package to generate uuid

https://github.com/broofa/node-uuid

// Generate a v4 (random) id
uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'

However, it does not provide a way to encode it in base64 or alphanumeric string.

Is there an easy way to do this?

Install;

https://github.com/RGBboy/urlsafe-base64

Then;

var uuid = require('node-uuid');
var base64 = require('urlsafe-base64');

base64.encode(Buffer(uuid.v4()));