Reference / Modules / node-api / Numbers / NormalizedNumber
Class: NormalizedNumber
node-api.Numbers.NormalizedNumber
Table of contents
Constructors
Properties
Methods
- _split
- isNegative
- isZero
- negate
- normalize
- split
- toFixedPrecision
- toFixedPrecisionDecimals
- toInteger
- toNumber
- toString
- unnormalize
- zeroStripLeft
- zeroStripRight
Constructors
constructor
• new NormalizedNumber(num
): NormalizedNumber
Parameters
Name | Type |
---|---|
num | string |
Returns
Defined in
Properties
_decimalPart
• Private
Readonly
_decimalPart: string
Defined in
_integerPart
• Private
Readonly
_integerPart: string
Defined in
_negative
• Private
Readonly
_negative: boolean
Defined in
_normalized
• Private
Readonly
_normalized: string
Defined in
Methods
_split
▸ _split(): Object
Returns
Object
Name | Type |
---|---|
decimalPart | string |
integerPart | string |
negative | boolean |
Defined in
isNegative
▸ isNegative(): boolean
Returns
boolean
Defined in
isZero
▸ isZero(): boolean
Returns
boolean
Defined in
negate
▸ negate(): NormalizedNumber
Returns
Defined in
normalize
▸ normalize(num
): string
Parameters
Name | Type |
---|---|
num | string |
Returns
string
Defined in
split
▸ split(): Object
Returns
Object
Name | Type |
---|---|
decimalPart | string |
integerPart | string |
negative | boolean |
Defined in
toFixedPrecision
▸ toFixedPrecision(decimals
): string
Parameters
Name | Type |
---|---|
decimals | number |
Returns
string
Defined in
toFixedPrecisionDecimals
▸ toFixedPrecisionDecimals(decimals
): string
Parameters
Name | Type |
---|---|
decimals | number |
Returns
string
Defined in
toInteger
▸ toInteger(): string
Returns
string
Defined in
toNumber
▸ toNumber(): number
Returns
number
Defined in
toString
▸ toString(): string
Returns
string
Defined in
unnormalize
▸ unnormalize(): string
Returns
string
Defined in
zeroStripLeft
▸ zeroStripLeft(num
): string
Parameters
Name | Type |
---|---|
num | string |
Returns
string
Defined in
zeroStripRight
▸ zeroStripRight(num
): string
Parameters
Name | Type |
---|---|
num | string |
Returns
string