@cto.af/linebreak
    Preparing search index...

    Class Rules

    Options for how rules are applied.

    Index

    Constructors

    Properties

    rules: BreakRule[]

    Copy of rules, safe to tweak.

    Methods

    • Add rules after the one named name.

      Parameters

      • name: string

        The name of the rule before.

      • ...newRules: BreakRule[]

      Returns number

      Index of start of the new rules

    • Add rules before the one named name.

      Parameters

      • name: string

        The name of the rule before.

      • ...newRules: BreakRule[]

      Returns number

      Index of start of the new rules

    • Enumerate all of the potential line breaks.

      Parameters

      • str: string

      Returns Generator<Break, void, unknown>

    • Remove the rules with names as indicated.

      Parameters

      • ...names: string[]

      Returns BreakRule[]

      The deleted rules

    • Replace the rule named name with the given rules.

      Parameters

      • name: string

        The name of the rule before.

      • ...newRules: BreakRule[]

      Returns BreakRule[]

      The replaced rules.