helpers/split

Source: split.js:2


Static Methods

split( arr: Array, func: splitCallback, keepSplitValue?: boolean, ): Array.<Array>

Split array into multiple arrays by specified condition.

Parameters

  • arr (Array) — Target array.
  • func (splitCallback) — Callback to split array.
  • keepSplitValue (boolean, optional, default: false) — Keep split value. The split point is before the matched value.

Returns

  • Array.<Array> — Split array.

Other

splitCallback: function

Return true at the split point.

Parameters

  • value (*)