mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
149839b60c
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
27 lines
665 B
TypeScript
27 lines
665 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
// This module is browser compatible.
|
|
|
|
/**
|
|
* Utilities for generating random numbers.
|
|
*
|
|
* ```ts
|
|
* import { randomIntegerBetween } from "@std/random";
|
|
* import { randomSeeded } from "@std/random";
|
|
* import { assertEquals } from "@std/assert";
|
|
*
|
|
* const prng = randomSeeded(1n);
|
|
*
|
|
* assertEquals(randomIntegerBetween(1, 10, { prng }), 3);
|
|
* ```
|
|
*
|
|
* @experimental **UNSTABLE**: New API, yet to be vetted.
|
|
*
|
|
* @module
|
|
*/
|
|
|
|
export * from "./between.ts";
|
|
export * from "./integer_between.ts";
|
|
export * from "./sample.ts";
|
|
export * from "./seeded.ts";
|
|
export * from "./shuffle.ts";
|