Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
Update dependencies (#80)
Browse files Browse the repository at this point in the history
* Update deps

* Remove normalization option from constructor

Arguments to the constructor are accepted as-is, without normmalization.

* Use yarn
  • Loading branch information
jessealama authored Feb 16, 2024
1 parent fbcf9e6 commit 3eabaa8
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 23 deletions.
45 changes: 33 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,8 @@
],
"exports": {
".": "./src/decimal128.mjs"
},
"dependencies": {
"yarn": "^1.22.21"
}
}
11 changes: 3 additions & 8 deletions src/decimal128.mts
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,6 @@ const infRegExp = /^-?inf(inity)?$/i;

interface ConstructorOptions {
roundingMode?: RoundingMode;
normalize?: boolean;
}

interface FullySpecifiedConstructorOptions {
Expand Down Expand Up @@ -893,10 +892,6 @@ function ensureFullySpecifiedConstructorOptions(
opts.roundingMode = options.roundingMode;
}

if ("boolean" === typeof options.normalize) {
opts.normalize = options.normalize;
}

return opts;
}

Expand Down Expand Up @@ -966,9 +961,9 @@ function ensureFullySpecifiedCmpOptions(
}

export class Decimal128 {
public readonly significand: string;
public readonly exponent: number;
public readonly isNegative: boolean;
private readonly significand: string;
private readonly exponent: number;
private readonly isNegative: boolean;
private readonly rat;

constructor(n: string, options?: ConstructorOptions) {
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/* Language and Environment */
"target": "ES2020" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
"lib": [
"es2020",
"es2020"
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
Expand Down Expand Up @@ -106,6 +106,6 @@

/* Completeness */
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
},
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
}

0 comments on commit 3eabaa8

Please sign in to comment.