UNPKG

socket-actions

Version:

Websocket implementation to simplify communication and queueing of user actions.

14 lines (10 loc) 334 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function randomHash() { const randomArray = new Uint8Array(16); crypto.getRandomValues(randomArray); return Array.from(randomArray) .map((byte) => byte.toString(16).padStart(2, "0")) .join(""); } exports.default = randomHash;