Info | ||
---|---|---|
| ||
This library has not yet been ported to the New Pico Engine |
The random library provides a few convenience utilities functions to generate random content
General Methods
word
Returns a random word using node random-words package. note Note that random-words parameters are not supported in krlKRL.
Code Block | ||||
---|---|---|---|---|
| ||||
str = random:word() |
uuid
Generates a UUID using node cuid package.
Code Block | ||||
---|---|---|---|---|
| ||||
str = random:uuid() |
integer
Returns a random integer between lower
and upper
(
...
Note that there is no method for generating a random number in this library. That is available from math:random(inclusive) using Lodash's random.
Code Block | ||||
---|---|---|---|---|
| ||||
n = random:integer(lower = 0, upper = 1) |
number
Returns a random number (float) between lower
and upper
(inclusive) using Lodash's random.
Code Block | ||||
---|---|---|---|---|
| ||||
n = random:integer(lower = 0, upper = 1) |