Group generator results into array
'cConcat'
combinator function concatenates the results
of generators executed in sequence into one array.
'cJoin' combinator function joins the results of generators
executed in sequence into one string.
Use 'chain' to execute generators in sequence.
object[] circulate(
object gen,
object base,
int count,
object state,
function result_transformer)
Same as 'permutate', 'circulate' executes the argument
generator 'gen' on the default object 'base'
and returns the resulting object array.
In difference to 'permutate', the results of all
attribute generators are combined together.
'current' provides access to current generated object.
'gen' creates a generator that returns the argument value 'v'
when executed on any input object.
Lazy generator evaluation wrapper
used for example by random generators.
'mapGen' is a helper function that
converts all elements of an array to
generators.
'mutate' executes generators 'gs' on the input object o.
'mutateOnAttribute' executes generators 'gs' on an object property
of name 'name'.
object[] permutate(
object gen,
object base,
int count,
object state,
function result_transformer)
'permutate' is one of two supported JSON object
generation functions.
'property' applies generator 'g' on an object property of name
'name' and returns the resulting object.
Creates a linear congruential random generator object using an optional
'seed' value.
any[] repeat(
integer n,
any v)
Repeats value 'v' 'n'-times and returns the resulting array.
'replicate' executes generator 'g' 'n'-times and combines
the results using
combinator function 'f'.
'seq' executes the generators 'gs' and combines the result using
combinator function 'f'.
'setVar' stores the result of one generator that can be used
as input to another generator in same generation process.
Wrappes a value into generator array,
the default input for 'mutate'.
Executes generators 'gs' on an input object
and returns the updated object.
Creates a generator that returns the value of the
variable 'name' when executed.
'withState' provides access to the state object.
'withVar' provides access to variables stored using
setVar
generator.
Converts JavaScript function arguments to an array.
any[] args2range(
arguments args,
integer min,
integer max)
Function arguments parser for 'range' functions.
Creates a new object with the argument objects as prototype.
'intOf' truncates the input to an int if the input object is a number.
any[] map(
function f,
any[] as)
Applies function 'f' on all elements of array 'as'.
Merges argument objects together.
'typeOf' extends JavaScript 'typeof' operator with
support for 'null', 'undefined', 'array' and
'date' types.