Skip to content

Commit

Permalink
Esm support added [from NiloCK](#100)
Browse files Browse the repository at this point in the history
* Bugfix #84 fixed buggy round

* 1.3.11

* 1.3.12

* bugfix #63: fix addition of -0

* build files

* 1.3.13

* added devcontainer

* changed gulpfile for macos

* added feature 'abs' #83

* 1.3.14

* added abs to readme

* 1.3.15

* semantic dependency updates

* Add feature for #32 setValue

* 1.4.0

* Merge branch 'master' of https://github.com/royNiladri/js-big-decimal into development

* upadted packagelock

* 1.4.1

* Add an ESM compatible build to grunt script via Rollup (#99)

* add rollup dev dependencies

* change export mechanism...

This does not change the `dist` command's current outputs

* add rollup es module bundling to grunt dist task

* Fix typo

* add "module" esm target file

* add built esm outputs

* fixed tests for esm

* 2.0.0

---------

Co-authored-by: Niladri Roy <niroy@informatica.com>
Co-authored-by: Colin Kennedy <NiloCK@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 2, 2023
1 parent 1e54899 commit 1d2d912
Show file tree
Hide file tree
Showing 31 changed files with 2,971 additions and 1,921 deletions.
1 change: 1 addition & 0 deletions dist/esm/abs.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare function abs(n: number | string | bigint): string;
3 changes: 3 additions & 0 deletions dist/esm/add.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export declare function add(number1: string, number2?: string): string;
export declare function trim(number: string): string;
export declare function pad(number1: string, number2: string): string[];
34 changes: 34 additions & 0 deletions dist/esm/big-decimal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { RoundingModes as Modes } from "./roundingModes";
declare class bigDecimal {
private value;
static RoundingModes: typeof Modes;
private static validate;
constructor(number?: number | string | bigint);
getValue(): string;
setValue(num: number | string | bigint): void;
static getPrettyValue(number: any, digits?: number, separator?: string): string;
getPrettyValue(digits?: number, separator?: string): string;
static round(number: any, precision?: number, mode?: Modes): string;
round(precision?: number, mode?: Modes): bigDecimal;
static abs(number: any): string;
abs(): bigDecimal;
static floor(number: any): any;
floor(): bigDecimal;
static ceil(number: any): any;
ceil(): bigDecimal;
static add(number1: any, number2: any): string;
add(number: bigDecimal): bigDecimal;
static subtract(number1: any, number2: any): string;
subtract(number: bigDecimal): bigDecimal;
static multiply(number1: any, number2: any): string;
multiply(number: bigDecimal): bigDecimal;
static divide(number1: any, number2: any, precision?: number): string;
divide(number: bigDecimal, precision: any): bigDecimal;
static modulus(number1: any, number2: any): string;
modulus(number: bigDecimal): bigDecimal;
static compareTo(number1: any, number2: any): 0 | 1 | -1;
compareTo(number: bigDecimal): 0 | 1 | -1;
static negate(number: any): string;
negate(): bigDecimal;
}
export default bigDecimal;
Loading

0 comments on commit 1d2d912

Please sign in to comment.