Constraints to be applied on mixedCase

Since 1.17.0

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

Properties

toggleCase?: (rawChar: string) => string

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

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

Since 1.17.0

untoggleAll?: (toggledString: string) => 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.