Gathering detailed insights and metrics for reduce-css-calc
Gathering detailed insights and metrics for reduce-css-calc
Gathering detailed insights and metrics for reduce-css-calc
Gathering detailed insights and metrics for reduce-css-calc
npm install reduce-css-calc
98.7
Supply Chain
93
Quality
76
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
55 Stars
115 Commits
15 Forks
7 Watching
5 Branches
13 Contributors
Updated on 03 Jul 2024
JavaScript (79.36%)
Yacc (20.64%)
Cumulative downloads
Total Downloads
Last day
-10.5%
367,014
Compared to previous day
Last week
2.1%
2,184,824
Compared to previous week
Last month
10%
9,025,661
Compared to previous month
Last year
-20.9%
106,137,134
Compared to previous year
Reduce CSS calc() function to the maximum.
Particularly useful for packages like rework-calc or postcss-calc.
1npm install reduce-css-calc
var reducedString = reduceCSSCalc(string, precision)
1var reduceCSSCalc = require("reduce-css-calc"); 2 3reduceCSSCalc("calc(1 + 1)"); 4// 2 5 6reduceCSSCalc("calc((6 / 2) - (4 * 2) + 1)"); 7// -4 8 9reduceCSSCalc("calc(1/3)"); 10// 0.33333 11 12reduceCSSCalc("calc(1/3)", 10); 13// 0.3333333333 14 15reduceCSSCalc("calc(3rem * 2 - 1rem)"); 16// 5rem 17 18reduceCSSCalc("calc(2 * 50%)"); 19// 100% 20 21reduceCSSCalc("calc(120% * 50%)"); 22// 60% 23 24reduceCSSCalc("a calc(1 + 1) b calc(1 - 1) c"); 25// a 2 b 0 c 26 27reduceCSSCalc("calc(calc(calc(1rem * 0.75) * 1.5) - 1rem)"); 28// 0.125rem 29 30reduceCSSCalc("calc(calc(calc(1rem * 0.75) * 1.5) - 1px)"); 31// calc(1.125rem - 1px) 32 33reduceCSSCalc("-moz-calc(100px / 2)"); 34// 50px 35 36reduceCSSCalc("-moz-calc(50% - 2em)"); 37// -moz-calc(50% - 2em)
See unit tests for others examples.
Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.
1git clone https://github.com/MoOx/reduce-css-calc.git 2git checkout -b patch-1 3npm install 4npm test
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
The latest stable version of the package.
Stable Version
1
0/10
Summary
Arbitrary Code Injection in reduce-css-calc
Affected Versions
< 1.2.5
Patched Versions
1.2.5
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 5/25 approved changesets -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
40 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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