Constraints to be applied on mixedCase

Remarks

Since 1.17.0

interface MixedCaseConstraints {
    toggleCase?: ((rawChar) => string);
    untoggleAll?: ((toggledString) => string);
}

Properties

toggleCase?: ((rawChar) => string)

Transform a character to its upper and/or lower case version

Type declaration

    • (rawChar): string
    • Parameters

      • rawChar: string

      Returns string

Default Value

try toUpperCase on the received code-point, if no effect try toLowerCase

Remarks

Since 1.17.0

untoggleAll?: ((toggledString) => string)

In order to be fully reversable (only in case you want to shrink user definable values) you should provide a function taking a string containing possibly toggled items and returning its untoggled version.

Type declaration

    • (toggledString): string
    • Parameters

      • toggledString: string

      Returns string