Added random.hex
This commit is contained in:
parent
ac7ac78d92
commit
645434ce7e
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue