Methods

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

Split array into multiple arrays by specified condition.

Parameters:
NameTypeAttributesDefaultDescription
arrArray

Target array.

funcsplitCallback

Callback to split array.

keepSplitedValueboolean<optional>
false

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

Returns:

Splited array.

Type: 
Array.<Array>

Type Definitions

splitCallback(value)

Return true at the split point.

Parameters:
NameTypeDescription
value*