UNPKG

@dicebear/avatars

Version:
23 lines (22 loc) 533 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const prng_1 = require("./utils/prng"); /** * @deprecated use `utils.prng` instead. */ class Random { constructor(seed) { this.prng = (0, prng_1.create)(seed); this.seed = this.prng.seed; } bool(likelihood = 50) { return this.prng.bool(likelihood); } integer(min, max) { return this.prng.integer(min, max); } pickone(arr) { return this.prng.pick(arr); } } exports.default = Random;