Gathering detailed insights and metrics for num2fraction
Gathering detailed insights and metrics for num2fraction
Gathering detailed insights and metrics for num2fraction
Gathering detailed insights and metrics for num2fraction
npm install num2fraction
Typescript
Module System
Node Version
NPM Version
100
Supply Chain
92.8
Quality
75.3
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
49 Stars
27 Commits
10 Forks
3 Watchers
1 Branches
6 Contributors
Updated on Nov 07, 2024
Latest Version
1.2.2
Package Id
num2fraction@1.2.2
Size
2.63 kB
NPM Version
2.11.2
Node Version
0.12.5
Published on
Sep 14, 2015
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
Converting Number to Fraction with Node.js.
1npm install num2fraction
1var π = Math.PI 2var n2f = require('num2fraction') 3 console.log(n2f(0)) // => 0 4 console.log(n2f(.2)) // => 1/5 5 console.log(n2f(1.1)) // => 11/10 6 console.log(n2f(1.2)) // => 6/5 7 console.log(n2f(1.3)) // => 13/10 8 console.log(n2f(1.4)) // => 7/5 9 console.log(n2f(1.5)) // => 3/2 10 console.log(n2f(2)) // => 2/1 11 console.log(n2f(2.1)) // => 21/10 12 console.log(n2f(3)) // => 3/1 13 console.log(n2f(2.555)) // => 511/200 14 console.log(n2f(8.36)) // => 209/25 15 console.log(n2f('3em')) // => 3/1 16 console.log(n2f('1.5px')) // => 3/2 17 console.log(n2f(7 / 9) // => 7/9 18 console.log(n2f(8 / 9) // => 8/9 19 console.log(n2f(512 / 999) // => 512/999 20 console.log(n2f((2 * π / 3) / π) // => 2/3 21 console.log(n2f((8 * 5) / (4 / 2)) // => 20/1
Opera old versions support the non-standard -o-min-device-pixel-ratio
or -o-max-device-pixel-ratio
in CSS media queries.
1@media 2 only screen and (-webkit-min-device-pixel-ratio: 2), 3 only screen and ( min--moz-device-pixel-ratio: 2), 4 only screen and ( -o-min-device-pixel-ratio: 2/1), /* Opera */ 5 only screen and ( min-device-pixel-ratio: 2), 6 only screen and ( min-resolution: 192dpi), /* fallback */ 7 only screen and ( min-resolution: 2dppx) { 8 9}
First release.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 5/25 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
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