Skip to end of metadata
Go to start of metadata

The random library provides a few convenience functions to generate random content


word

Returns a random word using node random-words package. Note that random-words parameters are not supported in KRL. 

str = random:word()


uuid

Generates a UUID using node cuid package.

str = random:uuid()


integer

Returns a random integer between lower and upper (inclusive) using Lodash's random. The range bounds can be equal or in any order.

n = random:integer(rangeBegin = 0, rangeEnd = 1)


number

Returns a random number (float) between lower and upper (inclusive) using Lodash's random. The range bounds can be equal or in any order.

n = random:number(rangeBegin = 0, rangeEnd = 1)