Skip to content

Latest commit

 

History

History
122 lines (89 loc) · 4.86 KB

data-types.md

File metadata and controls

122 lines (89 loc) · 4.86 KB

Data Types

TPrettyFloatOption

The parameters for the decimal part and/or customizing digit grouping passed as provider to the module that imports _ NgIndigitModule_.

{
  digitGroups?: TPrettyFloatDigitGroupOption;
  decimal?: TPrettyFloatDecimalOption;
}

TPrettyFloatDigitGroupOption

The parameters for customizing digit grouping; you can set the group size and the delimiter character for the digit groups of the integer and/or the decimal part of the number.

Accepts boolean, Partial<IDigitGroupParam>, or IPrettyFloatDigitGroupOption.

Note:

  • passing a boolean or Partial<IDigitGroupParam> sets digit grouping parameters for both integer and decimal parts of the number; passing parameters for each part individually overrides such values!

TPrettyFloatDecimalOption

The decimal part parameters; you can set any combination of the following parameters:

  • the float point (decimal separator) character;
  • maximum number of decimal digits;
  • minimum number of decimal digits;
  • whether decimal numbers are accepted.

Accepts boolean, or Partial<IPrettyFloatDecimalParam>.

IPrettyFloatDigitGroupOption

The parameters for customizing digit grouping; you can set the group size and the delimiter character for the integer and/or the decimal part of the number.

{
  integerPart?: TDigitGroupOption;
  decimalPart?: TDigitGroupOption;
  hasDigitGroups?: boolean;
}

Note:

  • setting hasDigitGroups to false always disables digit grouping.

TDigitGroupOption

The parameters for customizing digit grouping; you can set the group size and the delimiter character for the digit groups.

Accepts boolean, or Partial<IDigitGroupParam>.

IDigitGroupParam

The parameters for customizing digit grouping; you can set the group size and the delimiter character.

Note:

  • setting groupSize to values smaller than or equal to0 (zero) disables digit grouping.
{
  groupSize: number;
  delimiter: TCustomCharacter;
}

IPrettyFloatDecimalParam

The parameters for customizing the decimal part; you can set the float point character (the character to use instead of the default . character in float numbers), whether float numbers are allowed, and the maximum / minimum number of decimal digits

{
  floatPoint: TCustomCharacter,
  isDecimalAllowed: boolean;
  maxDigitCount: number;
  maxDigitCount: number;
}

Note:

  • setting minDigitCount to values smaller than or equal to 0 (zero) removes this restriction;
  • setting maxDigitCount to values smaller than 0 (zero) removes this restriction;
  • setting maxDigitCount to 0 (zero) disables decimals.
  • setting isDecimalAllowed to false always disables decimals.

TCustomCharacter

Any character (a string where length === 1).