UNPKG

@dicebear/avatars

Version:

An avatar library for designers and developers.

23 lines (22 loc) 528 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 = 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;