Module: config/roboliqDirectiveHandlers

Roboliq's default directives.

Source:

Methods


<inner> directive_factorialMerge(spec)

Merge an array of objects, or combinatorially merge an array of arrays of objects.

Parameters:
Name Type Description
spec Array

The array of objects or arrays of objects to merge.

Source:
Returns:

The object or array resulting from combinatorial merging.

Type
Object | Array

<inner> genMerge2(spec, data, obj0, index, acc)

Helper function for factorial merging of arrays of objects. For example, the first element of the first array is merged with the first element of the second array, added to the acc list, then the first element of the first array is merged with the second element of the second array, and so on.

Parameters:
Name Type Description
spec array

array of objects, may be nested arbitrarily deep, i.e. array of arrays of objects

data object

[description]

obj0 object

accumulated result of the current merge, will be added to acc once the end of the spec list is reached

index number

index of current item in spec

acc array

accumulated list of merged objects

Source:
Returns:

Returns a factorial list of merged objects.

Type
array