INNER CODE UNIT · TypeScript

limit

aws-devtools-labs/aws-blocks · native/swift/Demo/typescript-demo/src/index.ts:315

  const limit = 256 - (256 % maxExclusive);
  const bytes = new Uint8Array(1);
  while (true) {
    crypto.getRandomValues(bytes);
    const value = bytes[0];
    if (value < limit) {
      return value % maxExclusive;
    }
  }
}

const myColor = COLORS[secureRandomIndex(COLORS.length)];

const realtimeArea = document.getElementById('realtime-area')!;
const cursors = new Map<string, HTMLElement>();
const statusEl = document.getElementById('realtime-status')!;

function cursorSvg(color: string): string {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…