Given two arrays of object
an array of object
another array of object
a function that takes two parameters (a, b) and returns a T
Flatten an array of arrays such as Group[] to a flat Array or Group
an array, usually an array of Groups
a boolean to specify whether the return type should be a Group or Array. Default is true
which returns a Group.
A convenient way to step through a range. Same as for (i=0; i<range; i++)
, except this also stores the resulting return values at each step and return them as an array.
a callback function(index). If this function returns a value, it will be stored at each step
a range to step through
an array of returned values at each step
Convert different kinds of parameters (arguments, array, object) into an array of numbers
a list of numbers, an array of number, or an object with {x,y,z,w} properties
Split an array into chunks of sub-array
an array
chunk size, ie, number of items in a chunk
optional parameter to "walk through" the array in steps
if true
, always go through the array till the end and loop back to the beginning to complete the segments if needed
Create a convenient stepper. This returns a function which you can call repeatedly to step a counter.
Maximum of the stepper range. The resulting stepper will return (min to max-1) values.
Minimum of the stepper range. Default is 0.
Stride of the step. Default is 1.
An optional callback function( step ), which will be called each tiem when stepper function is called.
a function which will increment the stepper and return its value at each call.
Send a warning message based on Util.warnLevel global setting. This allows you to dynamically set whether minor errors should be thrown or printed in console or muted.
any error or warning message
optional return value
Zip arrays. eg, [[1,2],[3,4],[5,6]] => [[1,3,5],[2,4,6]]
an array of arrays
Generated using TypeDoc
Util provides various helper functions