Added random.hex

This commit is contained in:
pyoor 2017-04-25 13:04:58 -04:00
parent ac7ac78d92
commit 645434ce7e

View file

@ -158,5 +158,8 @@ var random = {
arr.splice(i, 1);
return obj;
}
},
hex: function(len) {
return Math.floor(Math.random() * ("0x1" + Array(len + 1).join("0"))).toString(16)
},
};