Commit 4122ca9
committed
Add build system; remove BigNumber.DEBUG; add toObject method
- Implement targeted builds (build.js) for ESM (.mjs), CommonJS (.cjs),
and browser (.js) distributables in dist/, with matching type
declarations (.d.mts, .d.cts, .d.ts).
- Remove BigNumber.DEBUG. The constructor now always throws on invalid
input instead of returning NaN. isBigNumber always validates structure.
- Don't call toString on arbitrary objects passed to the constructor.
- Require value to be a string when a base is also passed.
- Add toObject prototype method.
- Add CI workflow and TypeScript type declaration import tests.
- Add .gitignore and .gitattributes; normalise line endings.
- Remove .npmignore; use 'files' field in package.json.
- Add typescript to devDependencies.
- Update README, API docs, and type declarations.1 parent a7bc1f1 commit 4122ca9
39 files changed
Lines changed: 5805 additions & 8410 deletions
File tree
- .github/workflows
- doc
- perf
- test
- methods
- typescript
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
This file was deleted.
0 commit comments