Interface ISplitOptions

Set of options that can be passed into split operator.

interface ISplitOptions {
    carryEnd?: SplitValueCarry;
    carryStart?: SplitValueCarry;
    toggle?: boolean;
}

Properties

carryEnd?: SplitValueCarry

Strategy for carrying every toggle-OFF or split value.

carryStart?: SplitValueCarry

Strategy for carrying every toggle-ON value. It is used only when in toggle mode.

toggle?: boolean

Changes what the split callback result represents. By default, it signals when we find a split value.

This option changes that into a toggle logic:

We start collecting values into a new list when the callback returns true one time, and we stop collecting values when it returns true the next time. And we do so repeatedly, skipping values outside [true, ..., true] toggles.