UNPKG

@blockchainhub/blo

Version:

blo is a small and fast library to generate Blockchain identicons.

2 lines (1 loc) 260 B
"use strict";export const seedRandom=r=>{const t=new Array(4).fill(0);for(let e=0;e<r.length;e++)t[e%4]=(t[e%4]<<5)-t[e%4]+r.charCodeAt(e);return()=>{const e=t[0]^t[0]<<11;return t[0]=t[1],t[1]=t[2],t[2]=t[3],t[3]=t[3]^t[3]>>19^e^e>>8,(t[3]>>>0)/2147483648}};