MCPcopy
hub / github.com/webpack/webpack / makeRng

Function makeRng

test/cssIdentifier.unittest.js:125–133  ·  view source on GitHub ↗
(/** @type {number} */ seed)

Source from the content-addressed store, hash-verified

123 const { escapeIdentifier, unescapeIdentifier, equalsLowerCase } = cssSyntax;
124 // mulberry32
125 const makeRng = (/** @type {number} */ seed) => {
126 let s = seed >>> 0;
127 return () => {
128 s = (s + 0x6d2b79f5) >>> 0;
129 let t = Math.imul(s ^ (s >>> 15), 1 | s);
130 t ^= t + Math.imul(t ^ (t >>> 7), 61 | t);
131 return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
132 };
133 };
134 const POOLS = [
135 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_",
136 "\\\\\\41\\3 \\{}\\@.#:;()[]<>\"' \t\n\r\f",

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected