Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

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 rangeStart and rangeEnd (inclusive) using Lodash's randomrangeEnd defaults to 1 and can be greater than, equal to, or less than rangeBegin.

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


number

Returns a random number (float) between rangeStart and rangeEnd (inclusive) using Lodash's randomrangeEnd defaults to 1 and can be greater than, equal to, or less than rangeBegin.

n = random:number(rangeBegin, rangeEnd = 1)
  • No labels