Installations
npm install decimalic
Developer Guide
Typescript
Yes
Module System
ESM
Min. Node Version
>=12.9.0
Node Version
14.0.0
NPM Version
6.14.4
Score
72.8
Supply Chain
88.7
Quality
75.5
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
r37r0m0d3l
Download Statistics
Total Downloads
1,517
Last Day
1
Last Week
21
Last Month
44
Last Year
230
GitHub Statistics
2 Stars
8 Commits
2 Watching
11 Branches
1 Contributors
Bundle Size
13.03 kB
Minified
5.56 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.0.1
Package Id
decimalic@1.0.1
Unpacked Size
299.97 kB
Size
85.29 kB
File Count
10
NPM Version
6.14.4
Node Version
14.0.0
Total Downloads
Cumulative downloads
Total Downloads
1,517
Last day
0%
1
Compared to previous day
Last week
950%
21
Compared to previous week
Last month
109.5%
44
Compared to previous month
Last year
-6.9%
230
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Decimalic
A small pack of utils for arbitrary-precision number calculations. Based on 'decimal.js-light'.
Usage
Require CommonJS.
1const { Decimal, diff, divide, multiply, sum } = require("decimalic");
Import as ECMAScript module.
1import { Decimal, diff, divide, multiply, sum } from "decimalic";
Examples
Diff
1import { diff } from "decimalic"; 2console.log(2.3 - 1.0); // 1.2999999999999998 3console.log(diff(2.3, 1.0)); // 1.3
Divide
1import { divide } from "decimalic"; 2console.log(5.3 / 0.1); // 52.99999999999999 3console.log(divide(5.3, 0.1)); // 53
Multiply
1import { multiply } from "decimalic"; 2console.log(2232.0 * 0.1); // 223.20000000000002 3console.log(multiply(2232.0, 0.1)); // 223.2
Sum
1import { sum } from "decimalic"; 2console.log(2.3 + 1.15); // 3.4499999999999997 3console.log(sum(2.3, 1.15)); // 3.45
See also
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/8 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More