Created
May 21, 2015 23:09
-
-
Save prestonp/c4c2986e16c798b76961 to your computer and use it in GitHub Desktop.
uuids in base 62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// just gluing libs | |
var uuid = require('node-uuid') | |
var Base62 = require('base62') | |
var genUUID62 = function() { | |
var buffer = []; | |
var opts = null; | |
var offset = 0; | |
uuid.v4(opts, buffer, offset); | |
return buffer.map(Base62.encode).join(''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment