panjareh
Version:
Panjareh using aparat and phoenix-video-player to play videos on desktops and tvs.
17 lines (16 loc) • 382 B
JavaScript
/**
* Get uinque id
*/
export const getUniqueUserId = () => {
var dt = new Date().getTime();
var uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
/[xy]/g,
function (c) {
var r = (dt + Math.random() * 16) % 16 | 0;
dt = Math.floor(dt / 16);
return (c == "x" ? r : (r & 0x3) | 0x8).toString(16);
}
);
console.log(uuid);
return uuid;
};