UNPKG

458 BTypeScriptView Raw
1import { Distribution } from "../types";
2/**
3 * Returns a Distribution to random value within the provided `source`
4 * within the sliced bounds of `begin` and `end`.
5 * @param source an array of items to pick from
6 * @param begin the beginning slice index (defaults to `0`)
7 * @param end the ending slice index (defaults to `source.length`)
8 */
9export declare function picker<T>(source: ArrayLike<T>, begin?: number, end?: number): Distribution<T>;