Skip to main content

Interface: MixedCaseConstraints

Defined in: packages/fast-check/src/arbitrary/mixedCase.ts:10

Constraints to be applied on mixedCase

Remarks

Since 1.17.0

Properties

toggleCase?

optional toggleCase?: (rawChar) => string

Defined in: packages/fast-check/src/arbitrary/mixedCase.ts:16

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

Parameters

ParameterType
rawCharstring

Returns

string

Default Value

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

Remarks

Since 1.17.0


untoggleAll?

optional untoggleAll?: (toggledString) => string

Defined in: packages/fast-check/src/arbitrary/mixedCase.ts:22

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.

Parameters

ParameterType
toggledStringstring

Returns

string