diff --git a/Decimal.ts b/Decimal.ts index 943893b..1d3f0cf 100644 --- a/Decimal.ts +++ b/Decimal.ts @@ -15,7 +15,7 @@ export default class Decimal { /** * Constructs a new Decimal instance, from a `mantissa` and an `exponent`. * - * Conceptually, a Decimal instance represents the value `mantissa * 10 ** exponent`. + * Conceptually, a Decimal instance represents the value `mantissa * 10 ^ exponent`. * * The constructor normalizes the mantissa and exponent, ensuring that the mantissa is as small as possible. * @@ -40,6 +40,15 @@ export default class Decimal { } } + /** + * Custom inspection method for Deno which returns the string representation of the Decimal instance. + * + * @returns A string representing the Decimal value. + */ + [Symbol.for('Deno.customInspect')](): string { + return this.toString(); + } + /** * Returns the absolute value of the current Decimal instance. * @@ -524,15 +533,6 @@ export default class Decimal { } } - /** - * Custom inspection method for Deno which the string representation of the Decimal instance. - * - * @returns A string representing the Decimal value. - */ - [Symbol.for('Deno.customInspect')](): string { - return this.toString(); - } - /** * A static constant representing the decimal value -1. */ diff --git a/deno.json b/deno.json index 310e1ab..33c67fe 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@quentinadam/decimal", - "version": "0.1.3", + "version": "0.1.4", "exports": "./Decimal.ts", "imports": { "@quentinadam/assert": "jsr:@quentinadam/assert@^0.1.6"