UNPKG

taro-sockjs-client

Version:
9 lines (8 loc) 199 B
function randomBytes(length) { let bytes = new Array(length) for (let i = 0; i < length; i++) { bytes[i] = Math.floor(Math.random() * 256) } return bytes } export default { randomBytes }