blob: e8d9c6cff99522b343a7612099bf1b18e9a8b992 (
plain) (
tree)
|
|
var CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
var generate = function(len) {
var uuid = [];
len = len || 14;
for (i = 0; i < len; i++) {
uuid[i] = CHARS[0 | Math.random()* CHARS.length];
}
return uuid.join('');
};
module.exports = {
generate: generate
};
|