Use this module if you have support for ESM integration with WebAssembly e.g. from a modern Node.js version, or a properly configured bundler.
If you are using this in a browser, remember that this module is implicitly asynchronous and might delay your bundle.
import { createPrng } from "simd-prng/wasm";// In a browser, you probably want this insteadconst { createPrng } = await import("simd-prng/wasm");const prng = createPrng();console.log(prng.randomInt()); Copy
import { createPrng } from "simd-prng/wasm";// In a browser, you probably want this insteadconst { createPrng } = await import("simd-prng/wasm");const prng = createPrng();console.log(prng.randomInt());
Use this module if you have support for ESM integration with WebAssembly e.g. from a modern Node.js version, or a properly configured bundler.
If you are using this in a browser, remember that this module is implicitly asynchronous and might delay your bundle.
Example