Methods#

(static) split(arr, func, keepSplitValueopt) → {Array.<Array>}#

Split array into multiple arrays by specified condition.

Parameters:
NameTypeAttributesDefaultDescription
arrArray

Target array.

funcsplitCallback

Callback to split array.

keepSplitValueboolean<optional>
false

Keep split value. The split point is before the matched value.

Returns:

Split array.

Type: 
Array.<Array>

Type Definitions#

splitCallback(value)#

Return true at the split point.

Parameters:
NameTypeDescription
value*